結果
問題 |
No.279 木の数え上げ
|
ユーザー |
![]() |
提出日時 | 2017-08-04 21:58:38 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 471 bytes |
コンパイル時間 | 435 ms |
コンパイル使用メモリ | 21,504 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 20:57:09 |
合計ジャッジ時間 | 3,560 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 10 RE * 11 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:13:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%s",s); | ^~~~~~~~~~~~~
ソースコード
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<time.h> int main(){ int a=0; int c=0; int b=0; int d=0; int i; char s[100000]; scanf("%s",s); for(i=0;i<strlen(s);i++){ if(s[i]=='t'||s[i]=='r'||s[i]=='e'){ if(s[i]=='t'){ a++; } if(s[i]=='r'){ b++; } if(s[i]=='e'){ c++; } } if(a==1&&b==1&&c==2){ a=0; b=0; c=0; d++; } } printf("%d\n",d); return 0; }