这是该题的链接http://acm.hdu.edu.cn/showproblem.php?pid=1002 具体的题的内容就不过多描述了,想必你已经知道了,当我看完这道题后就知道咋写了,可是这道题从开始写到最后accept却花了我好长时间. 先描述一下我的思路,当我看到第二个测试数据后就知道用可以表示范围最大的unsigned long long int 也是无法表示的,之前刷蓝桥杯里面的题,遇到过这种题 因为我对java熟悉一下,所以可以使用BigDecimal解决,或者用数组.所以我果断采用…
#include<stdio.h>#include<string.h> int main(){ char str1[1001],str2[1001]; int t,i,maxlen,len1,len2,k,num=1; scanf("%d",&t); getchar(); while(t--) { int a[1001]={0},b[1001]={0},c[1001]={0}; scanf(…
Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines fol…
Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines fol…
#include<stdio.h> int main() { int m; int i; scanf("%d", &m); ]; int y; int z; ; i < m; i++) { scanf("%s %d", &x, &y); ] >= ] <= 'Z') { z=(x[] - ; y = y + z; } else { z=(x[] - )*(-); y = y + z; } printf("…
杭电ACM(1002)大数相加 A + B Problem II Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. InputThe first line of the input contains an integer T(1<=T<=20) which means the number…
最近忙于考试复习,没有多少可供自己安排的时间,所以我利用复习之余的空闲时间去刷刷杭电acm的题目,也当对自己编程能力的锻炼吧. Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contains an integer T(1…