Fork me on GitHub

02 2020 档案

摘要:思路:用字符串类型string可以很方便的获取题目要求的数字,获得DA||DB的个数,然后通过循环转换成整型,相加后的到结果 #include<iostream> using namespace std; int main() { string A = "0" , B = "0"; int DA = 阅读全文
posted @ 2020-02-10 18:22 GOGP_nikto 阅读(102) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<math.h> using namespace std; //judge函数是用来判断一个数是否是素数,是素数函数返回1,不是返回0 int judge(int a) { int count = 0; for (int i = 1; i <= 阅读全文
posted @ 2020-02-02 17:59 GOGP_nikto 阅读(89) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> using namespace std; int main() { int N = 0; int arry[10000] = { 0 }; int count_A1 = 0,flag=1,count_A2=0,count_A3=0,count_A4=0,coun 阅读全文
posted @ 2020-02-02 17:50 GOGP_nikto 阅读(126) 评论(0) 推荐(0) 编辑
摘要:1011 A+B 和 C (15分) 给定区间 [−2​31​​,2​31​​] 内的 3 个整数 A、B 和 C,请判断 A+B 是否大于 C。 输入格式: 输入第 1 行给出正整数 T (≤10),是测试用例的个数。随后给出 T 组测试用例,每组占一行,顺序给出 A、B 和 C。整数间以空格分隔 阅读全文
posted @ 2020-02-02 17:48 GOGP_nikto 阅读(147) 评论(0) 推荐(0) 编辑