2 条题解
-
0
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e,f,g,h,i,j; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i>>j; int z; cin>>z; int y=0; if(30+z>=a){ y++; } if(30+z>=b){ y++; } if(30+z>=c){ y++; } if(30+z>=d){ y++; } if(30+z>=e){ y++; } if(30+z>=f){ y++; } if(30+z>=g){ y++; } if(30+z>=h){ y++; } if(30+z>=i){ y++; } if(30+z>=j){ y++; } cout<<y; return 0; }
-
0
C++ :
#include<bits/stdc++.h> using namespace std; int main(){ int n=10,t,sum=0; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } cin>>t; for(int j=0;j<n;j++){ if(t+30>=a[j]) sum=sum+1; } cout<<sum<<endl; return 0; }
Python :
# coding=utf-8 x = input().split() n=int(input()) m=n+30 s=0 for i in x: if int(i)<=m: s+=1 print(s)
- 1
信息
- ID
- 160
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 10
- 标签
- 递交数
- 3
- 已通过
- 0
- 上传者