标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 18360 Accepted Submission(s): 8922
算法题做不动 水一道吧
#include<stdio.h> #include<string.h> #include<math.h> int main() { int a,b,k,i; while(scanf("%d%d",&a,&b),a|b) { scanf("%d",&k); int ans=pow(10,k); if(a%ans==b%ans) printf("-1\n"); else printf("%d\n",a+b); } return 0; }
标签:
原文地址:http://www.cnblogs.com/tonghao/p/4982380.html