无脑题解
2022-11-27 09:39:20
发布于:江苏
278阅读
0回复
0点赞
直接上手判断,看看陶陶身高加上30有没有大于苹果高度就行了
直接暴力
#include <iostream>
using namespace std;
int main(){
int q,w,e,r,t,y,u,i,o,p,a,s;
cin>>q>>w>>e>>r>>t>>y>>u>>i>>o>>p>>a;
if (a+30>=q) s++;
if (a+30>=w) s++;
if (a+30>=e) s++;
if (a+30>=r) s++;
if (a+30>=t) s++;
if (a+30>=y) s++;
if (a+30>=u) s++;
if (a+30>=i) s++;
if (a+30>=o) s++;
if (a+30>=p) s++;
cout<<s;
return 0;
}
我甚至不想拿这个代码发题解
全部评论 4
建议
4天前 来自 浙江
0#include<bits/stdc++.h>
using namespace std;
//"复仇者"MAN
int main()
{
int a [ 100 ];
int l = 0;
int n;
for ( int i = 1; i <= 10; i ++ ) {
cin >> a [ i ];
}
cin >> n;
for ( int i = 1; i <= 10; i ++ ) {
if ( n + 30 >= a [ i ] ) {
l = l + 1;
}
}
cout << l;
return 0;
}4天前 来自 浙江
0数组不香吗?非要用那么多变量。
2025-01-29 来自 广东
0真暴力
2024-04-20 来自 上海
0
有帮助,赞一个