Problem Description 读入两个不超过25位的火星正整数A和B,计算A+B.需要注意的是:在火星上,整数不是单一进制的,第n位的进制就是第n个素数.例如:地球上的10进制数2,在火星上记为“1,0”,因为火星个位数是2进制的:地球上的10进制数38,在火星上记为“1,1,1,0”,因为火星个位数是2进制的,十位数是3进制的,百位数是5进制的,千位数是7进制的…… Input 测试输入包含若干测试用例,每个测试用例占一行,包含两个火星正整数A和B,火星整数的相邻两位数用逗号分隔…
火星A+B Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 10288 Accepted Submission(s): 3409 Problem Description 读入两个不超过25位的火星正整数A和B,计算A+B.须要注意的是:在火星上.整数不是单一进制的.第n位的进制就是第n个素数.比如:地球上的10进制数2.在火星上记…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1002 A + B Problem II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 230247 Accepted Submission(s): 44185 Problem Description I have a very sim…
#include <stdio.h> #include <string.h> int main(void) { int q,j,h,k,l; int d; ],s2[];//题目要求位数不大于1000 scanf("%d",&h); ;l<=h;l++){ ]={}, a[]={},b[]={};//这样可以令数组内全部元素为0 scanf("%s %s",&s1,&s2); int cd1,cd2,cd3,cd…
A == B ? Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 64243 Accepted Submission(s): 10061 Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES"…
题目连接:http://www.ifrog.cc/acm/problem/1056 DESCRIPTION Two octal number integers a, b are given, and you need calculate the result a - b in octal notation.If the result is negative, you should use the negative sign instead of complement notation. INPU…