样例过了但零分???

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

_Jarvis_ @ 2022-09-25 15:23:56

#include<bits/stdc++.h>
using namespace std;
int a[11],n,s;
int main(){
    //freopen("b.in","r",stdin);
    //freopen("b.out","w",stdout);
    for(int i=1;i<=10;i++){
        cin>>a[i];
        a[i]-=30;
    }
    cin>>n;
    for(int i=1;i<=10;i++){
        if(a[i]<=n){
            s++;
        }
    }
    cout<<s;
    //fclose(stdin);fclose(stdout);
    return 0;
}

好像没问题???


by Komorebi_03 @ 2022-09-25 15:32:57

AC啊(?


by moli0518_qwq @ 2022-09-25 15:39:31

结果是AC啊(?我刚测试的


by _Jarvis_ @ 2022-09-25 19:58:04

???az,我这咋测都是全WA我不理解


by _Jarvis_ @ 2022-09-25 19:58:41

153 192 174 186 179 104 157 172 128 182 100 2 第一组数据跑了一下也没问题giao


by _Jarvis_ @ 2022-09-25 19:59:50

焯 我提交语言选的PHP


by Score_Elevate @ 2022-10-07 16:03:17

@Jarvis 你真是大聪明 能编译过去都是奇迹了


by _Jarvis_ @ 2022-10-07 16:05:08

@langziduan azaz


by Score_Elevate @ 2022-10-07 16:06:55

@Jarvis 你能告诉我你是如何没有编译错误的吗?


by _Jarvis_ @ 2022-10-07 16:25:45

@langziduan 我不到啊 就编译过了但wa


by wanghonghao123456 @ 2023-06-23 16:23:00

int a[11],n,s;

大哥,s在没有确定是啥值时是随机数肯定不对了,应该改成:

int a[11],n,s=0;

这样就对了


| 下一页