最后一个点WA怎么办

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

Wallacewwz @ 2023-01-05 14:11:06

最后一个点WA怎么办

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int a[1005]; 
int main()
{
    int n;
    for(int i = 0;i<10;i++)
    {
        cin >> n;
        a[i] = n;
    }
    int x;
    cin >> x;
    x = x + 30;
    int sum,b;
    for(int i = 0;i<10;i++)
    {
        b = a[i];
        if (x > b)
        {
            sum += 1;
        }
    }
    cout << sum;
}

by WA_sir @ 2023-01-05 14:17:39

@Wallace2011 x>=b


by Wallacewwz @ 2023-01-05 14:18:42

@WA_sir 好的谢谢


by Tx1234567 @ 2023-01-12 12:14:51

再交一下


by __Furina___ @ 2023-01-15 10:03:27

? ! @

对对对


|