随笔分类 -  数论

摘要:题目:输入两个数,输出两个数相乘的结果 输入样例: 1234567890098765432100 输出样例: 1219326311126352690000 #include <iostream> #include <math.h> #include <algorithm> #include <str 阅读全文
posted @ 2020-04-18 11:32 Maxwell· 阅读(405) 评论(0) 推荐(0)
摘要:计算出第一个正整数n的阶乘位数大于等于 10000的数是多少,即求最小的正整数 n满足 n! 的位数大于等于 10000 知识点:某数 m 的位数可以由 log10(n)+1 取得 #include <cstdio> #include <string.h> #include <iostream> # 阅读全文
posted @ 2020-03-04 16:25 Maxwell· 阅读(260) 评论(0) 推荐(0)
摘要:一天蒜头君猜想,是不是所有的偶数(除了 2),都可以用两个质数相加得到呢? 输入格式第一行输入一个整数 t 表示测试组数。接下来 t 行,每行一个整数 n。 输出格式输出两个整数,因为答案可能有多个,所有要求输出的这两个整数是所有答案中字典序最小的。 数据范围对于 30%的数据 1<=t<=10^3 阅读全文
posted @ 2020-03-02 22:48 Maxwell· 阅读(185) 评论(0) 推荐(0)