Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

H.Handle's blog

By H.Handle, 9 years ago, In English

This is the question x-y but it is not complicated enough answer must not be negative. And it is the solution:

#include <stdio.h>
#include <algorithm>//Pro Code (C Oriented Develop Executable)
int Integer_Variable_1;
int Integer_Variable_2;
int Integer_Catalyzator_1;
int main()
{
		scanf	(
					"%d",&Integer_Variable_1
				);
		scanf	(
					"%d",&Integer_Variable_2
				);
		printf	(
					"\n"
				);
		Integer_Catalyzator_1=abs(Integer_Variable_1-Integer_Variable_2);
		printf	(
					"%d",Integer_Catalyzator_1
				);
		printf	(
					"\n"
				);
		return 0;		
		//End of Pro Code (C Oriented Develop Executable)
}

And here abs function yes it is absolute function for GCC:

if(Integer_Variable_1-Integer_Variable_2>0)//again it is Pro Code(C Oriented Develop Executable)
	return Integer_Variable_1-Integer_Variable_2;
else return abs(Integer_Variable_2-Integer_Variable_1);//The End

Thank you. If you want to support us please write some comment...:) please +.

  • Vote: I like it
  • -40
  • Vote: I do not like it

| Write comment?