题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1250 hdu1250: Hat's Fibonacci Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9442 Accepted Submission(s): 3096 Problem Description A Fibonacci…
题目连接: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…
1503:Integer Inquiry 总时间限制: 1000ms 内存限制: 65536kB 描述 One of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers. ``This super…
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): 261608 Accepted Submission(s): 50625 Problem Description I have a very simple p…
题目描述: Input The first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each line consists of two positive integers, A and B. Notice that the integers are very large, that means you should n…
Computer Transformation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8367 Accepted Submission(s): 3139 Problem Description A sequence consisting of one digit, the number 1 is initially wri…
大数加法 思路一:定义String变量str1和str2分别存储输入的两个大数,定义num1[]和num2[]两个int型数组,将两个字符串分别逐个字符逆序存入数组,定义sum[]数组存放求和结果,使用循环两个数组中的元素逐位相加,并判断是否进位,最后逆序输出数组sum[]中的每个元素. import java.util.Scanner; public class largenumberOperationAdd { public static void main(String[] args){…
题目链接 https://www.patest.cn/contests/pat-a-practise/1065 思路 因为 a 和 b 都是 在 long long 范围内的 但是 a + b 可能会溢出 long long 但是 不会溢出 long double 所以 用long double 就能轻松解决了 或者 用大数加法 也行 AC代码 #include <cstdio> #include <cstring> #include <ctype.h> #includ…
A+B Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 811 Accepted: 371 Description The Research Institute of Given Strings (RIGS) is a well-known place where people investigate anything about strings. Peter works in the department of st…
1024 Palindromic Number (25 分) A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers. Non-palindromic…