为啥WA?????

P1046 [NOIP2005 普及组] 陶陶摘苹果

z___u___y @ 2023-08-24 14:22:31

5WA?


#include<bits/stdc++.h>
using namespace std;
int main(){
    int a[11];
    for(int i=1;i<=10;i++){
        cin>>a[i];
    }
    int tt;
    cin>>tt;
    int sum=0;
    for(int i=1;i<=10;i++){
        if(a[i]+30<=tt){
            sum++; 
        }
    }
    cout<<sum;
    return 0;
} 

by Joker_lazydoghead @ 2023-08-24 14:24:37

《a[i]+30<=tt》


by z___u___y @ 2023-08-24 14:26:22

已AC


by tallnut @ 2023-08-24 14:27:02

a[i]<=tt+30。。。。。。


|