2 条题解

  • 0
    @ 2024-10-20 8:49:27
    #include<bits/stdc++.h>
    using namespace std;
    int a[1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001];
    int main(){
    	for(int i=1;i<=10;i++){
    		cin>>a[i];
    	}
    	int b,cnt=0;
    	cin>>b;
    	for(int i=1;i<=10;i++){
    		if(b+30>=a[i]){
    			cnt++;	
    		}
    		else{
    			continue;
    		}
    	}
    	cout<<cnt;
    	return 0;
    }
    
    
    • -1
      @ 2024-6-10 17:00:33
      #include<bits/stdc++.h>
      using namespace std;
      int pighuohuo[500001];
      int main(){
      	for(int i=1;i<=10;i++){
      		cin>>pighuohuo[i];
      	}
      	int pigun,pig=0;
      	cin>>pigun;
      	for(int i=1;i<=10;i++){
      		if(pigun+30>=pighuohuo[i]){
      			pig++;	
      		}
      		else{
      			continue;
      		}
      	}
      	cout<<pig;
      	return 0;
      }
      
      • 1

      信息

      ID
      219
      时间
      1000ms
      内存
      16MiB
      难度
      7
      标签
      递交数
      231
      已通过
      61
      上传者