随笔分类 -  江南信息学每周练习题解

摘要:1001:奥运乒乓球一局比赛结果1因为输入的数据是比赛后,所以谁大谁赢1002: 奥运乒乓球一局比赛结果2如果A要赢,那么必须要满足a-b大于等于2并且a大于等于11分的情况,B要赢也是同理,否则就是要继续1003:求最小值设minn等于较大值,循环n遍,每次输入x时和minn比较出较小值1004: 阅读全文
posted @ 2023-03-31 17:22 CRt0729 阅读(32) 评论(0) 推荐(0) 编辑
摘要:比赛链接 1001 C语言实验题――三个整数记得保留2位小数是%.2f 1 #include<bits/stdc++.h> 2 using namespace std; 3 int main() 4 { 5 int a,b,c; 6 cin>>a>>b>>c; 7 printf("%d %d %.2 阅读全文
posted @ 2023-03-16 20:35 CRt0729 阅读(43) 评论(0) 推荐(0) 编辑
摘要:比赛链接 1001:三个数的最大值 条件判断,如判断a最大就是a>=b && a>=c,以此类推 #include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; cout<<max(a,max(b, 阅读全文
posted @ 2023-03-09 16:39 CRt0729 阅读(46) 评论(0) 推荐(0) 编辑
摘要:比赛链接 1001:C语言实验题――找中间数 三个判断,如 if(a>=b&&b>=c)那就是b #include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(b>=a && a>=c||c 阅读全文
posted @ 2023-02-28 21:02 CRt0729 阅读(42) 评论(0) 推荐(0) 编辑
摘要:1001 : 分数乘法 #include<bits/stdc++.h> using namespace std; float a,b,c,d; int main() { char t; cin>>a>>t>>b>>t>>c>>t>>d; printf("%.3f",a/b*c/d); return 阅读全文
posted @ 2022-12-07 14:25 CRt0729 阅读(43) 评论(0) 推荐(0) 编辑
摘要:比赛链接 1001: 排座位 找规则,可以发现对于n个位置最多可以坐n/2向上取整个人 python: #1.排座位 n = int(input()) if n%2==0: #判断n是否是偶数 print(int(n/2))#对n/2保留整数 else: print(int(n/2+1)) View 阅读全文
posted @ 2022-11-18 18:53 CRt0729 阅读(61) 评论(0) 推荐(0) 编辑
摘要:比赛链接 1001: 神奇的力学 重力 = 支持力,所以输入的重力是什么,支持力就是什么 #include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; cout<<a; return 0; } View Code 1 阅读全文
posted @ 2022-11-11 15:26 CRt0729 阅读(78) 评论(0) 推荐(0) 编辑
摘要:比赛链接 1001 : 圆的直径 #include<bits/stdc++.h> using namespace std; int main() { int r; cin>>r; cout<<r*2; return 0; } View Code 1002 : 人犬同行 #include<bits/s 阅读全文
posted @ 2022-11-04 17:12 CRt0729 阅读(77) 评论(0) 推荐(0) 编辑
摘要:比赛链接 1001 : 长方形的周长 python: a = int(input()) b = int(input()) print((a+b)*2) View Code C++: #include<bits/stdc++.h> #include<iostream> using namespace 阅读全文
posted @ 2022-10-28 19:11 CRt0729 阅读(56) 评论(0) 推荐(0) 编辑
摘要:比赛链接 6436计算表达式的值 python: a,b = map(int,input().split()) print(3*a+2*b) View Code C++: #include <bits/stdc++.h> using namespace std; int main() { int x 阅读全文
posted @ 2022-10-21 20:04 CRt0729 阅读(66) 评论(0) 推荐(0) 编辑
摘要:1001:给定一个字符,用它构造一个对角线长3个字符,倾斜放置的菱形 python: c = input() print(' '+c) print(c+c+c) #3*c print(' '+c) View Code C++: #include<iostream> #include<bits/std 阅读全文
posted @ 2022-10-15 14:03 CRt0729 阅读(126) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示