結果

問題 No.279 木の数え上げ
ユーザー asdfghjkl;asdfghjkl;
提出日時 2019-10-09 18:43:15
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 368 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 29,056 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-28 17:10:59
合計ジャッジ時間 1,106 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |     scanf("%s",s);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:3:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |     scanf("%s",s);
      |     ^~~~~
main.c:3:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:13: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |             printf("%d\n",min);
      |             ^~~~~~
main.c:14:13: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:13: note: include '<stdio.h>' or provide a declaration of 'printf'

ソースコード

diff #

main(){
    char s[10000000];
    scanf("%s",s);
    int t=0,r=0,e=0;
    for(int count=0;s[count]!='\0';count++){
        if(s[count]=='t'){t++;}
        else if(s[count]=='r'){r++;}
        else if(s[count]=='e'){e++;}
    }
    int min=999999999;
    if(min<=t){min=t;}
        if(min<=r){min=r;}
            if(min<=(e/2)){min=e;}
            printf("%d\n",min);
}
0