大佬求解,为什么超时了……

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

furnace_too_hot @ 2019-12-02 19:51:39


#include <stdio.h>

int main(){

    int apple[9];
    int tall;

    for(register int i = 0;i < 10;i ++){
        scanf("%d ",&apple[i]);
    }

    scanf ("\n%d",&tall);

    tall +=30;

    int get = 0;
    for(register int i = 0;i < 10;i ++){
        if(tall >= apple[i])
        get ++;
    }

    printf("%d",get);
    return get;
}

by yangzhiqin @ 2019-12-02 19:56:31

@furnace_too_hot 不能return get


by 已注销HeBhs37KwrDer @ 2019-12-02 19:57:18

@furnace_too_hot

return get;==>return 0;


by Mr_Greeper @ 2019-12-02 20:03:07

我活了这么多年头一次见这个题TLE的


by 一滴小水滴 @ 2019-12-02 20:04:29

@Mr_Greeper 没见过


by zhao85xing @ 2019-12-02 20:06:51

此题还能TLE?!学到了


by Zxx132536 @ 2019-12-02 20:16:24

return 0;


by Zxx132536 @ 2019-12-02 20:16:33

666666


by UltiMadow @ 2019-12-02 20:25:40

淘淘摘苹果TLE qaq


by 老卫 @ 2020-01-17 22:38:19

@Mr_Greeper(づ ̄3 ̄)づ4——
不要骂人,小心遭报应


|