LeetCode Add Binary
摘要:链接: https://oj.leetcode.com/problems/add-binary/大数加法.二进制class Solution{ public: string addBinary(string a,string b) { bool sign=false; string an...
阅读全文
NYOJ 759 你知道这个规律吗?
摘要:链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=759找了半天没找到什么规律....直接按大数除法做了 #include #include using namespace std;char num[100005];int main(){ int...
阅读全文
NYOJ 28 大数阶乘
摘要:链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=28大数问题。模拟手工运算,用一个变量储存进位:被乘数逐位乘以乘数。#include #include #include int ans[20000];char tem[5];int t; ...
阅读全文
ZJU 1272 Numerically Speaking
摘要:大数问题......根据先余为低位,后余为高位的基本思想,进行26->10进制的互相转换。注意如果输入为的10进制数为26的整数时,要先减一再求余,最后结果在加a..因为目标进制没有表示0的数Presentation Error 了好几次。。要看到这句话“and the corresponding ...
阅读全文