UVa 10055 - Hashmat the Brave Warrior

来源:互联网 发布:解压缩软件手机版 编辑:程序博客网 时间:2024/05/21 12:51

题目:输出差值的绝对值。

分析:简单题。

注意:数据类型要用long long、不要使用abs()。

#include <stdio.h>#include <stdlib.h>#include <math.h>int main(){long long a,b; while ( scanf("%lld%lld",&a,&b) != EOF )if ( a > b )printf("%d\n",a-b);else printf("%d\n",b-a); return 0;}


原创粉丝点击