02 2020 档案
摘要:思路:用字符串类型string可以很方便的获取题目要求的数字,获得DA||DB的个数,然后通过循环转换成整型,相加后的到结果 #include<iostream> using namespace std; int main() { string A = "0" , B = "0"; int DA =
阅读全文
摘要:#include<iostream> #include<math.h> using namespace std; //judge函数是用来判断一个数是否是素数,是素数函数返回1,不是返回0 int judge(int a) { int count = 0; for (int i = 1; i <=
阅读全文
摘要:#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
阅读全文
摘要:1011 A+B 和 C (15分) 给定区间 [−231,231] 内的 3 个整数 A、B 和 C,请判断 A+B 是否大于 C。 输入格式: 输入第 1 行给出正整数 T (≤10),是测试用例的个数。随后给出 T 组测试用例,每组占一行,顺序给出 A、B 和 C。整数间以空格分隔
阅读全文