#include <stdio.h> #include <assert.h> int main() { long long hash, opp; int t; while (scanf("%lld%lld", &hash, &opp) == 2) { printf("%lld\n", (hash < opp) ? opp - hash : hash - opp); } }
大整数问题,输入数据不大于2^32次方,因此用32位的int是不够的。故而采用long long型,输入输出占位符为"%lld"