3 条题解
-
3
又是挥肠简单的一道题辣👀️
直接上代码👍
#include <bits/stdc++.h> using namespace std; int z , r , d; int main() { int n , x; cin >> n; for (int i = 0; i < n; i++) { cin >> x; if (x < 90) r++; else if (x == 90) z++; else d++; } cout << z << " " << r << " " << d; return 0; }
已AC,放心食用吧
-
1
#include <bits/stdc++.h> using namespace std; int n, m, sumzhi, sumrui, sumdun; int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> m; if (m == 90) { sumzhi += 1; } else if (m < 90) { sumrui += 1; } else { sumdun += 1; } } cout << sumzhi << " " << sumrui << " " << sumdun; return 0; }
-
0
#include <iostream>//hetao3097453 using namespace std; int a[101]; int main() { int n,zhi = 0,rui = 0,dun = 0; cin >> n; for(int i = 1;i <= n;i++) { cin >> a[i]; } for(int i = 1;i <= n;i++) { if(a[i] == 90) { zhi++; } else if(a[i] > 90) { dun++; } else if(a[i] < 90) { rui++; } } cout << zhi << " " << rui << " " << dun << endl; return 0; }
- 1
信息
- ID
- 800
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 1
- 标签
- 递交数
- 71
- 已通过
- 56
- 上传者