Skip to content

Instantly share code, notes, and snippets.

@henrybear327
Last active August 29, 2015 14:07
Show Gist options
  • Save henrybear327/96b4309e05a352bc90d1 to your computer and use it in GitHub Desktop.
Save henrybear327/96b4309e05a352bc90d1 to your computer and use it in GitHub Desktop.
ACM10055(normal).c
#include <stdio.h>
#include <stdlib.h>
/*
ACM doesn't take %I64d\n, they take %lld\n only.
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=12&problem=996&mosmsg=Submission+received+with+ID+14345306
*/
int main()
{
long long int input_1, input_2;
while(scanf("%lld %lld", &input_1, &input_2) != EOF)
{
if(input_1 - input_2 >= 0)
printf("%lld\n", input_1 - input_2);
else
printf("%lld\n", input_2 - input_1);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment