各位神犇,还能优化吗?
  • 板块灌水区
  • 楼主Innate_Joker
  • 当前回复10
  • 已保存回复11
  • 发布时间2024/3/31 11:49
  • 上次更新2024/3/31 14:14:05
查看原帖
各位神犇,还能优化吗?
1086443
Innate_Joker楼主2024/3/31 11:49
#include<cstdio>
using namespace std;
int main() {
	int a[11] {};
	for(int i=1; i<=10; i++) scanf("%d",&a[i]);
	int x,total=0;
	scanf("%d",&x);
	x+=30;
	for(int i=1; i<=10; i++)
	  if(a[i]<=x)
	  	total++;
	printf("%d",total);
	return 0;
}
2024/3/31 11:49
加载中...