結果

問題 No.279 木の数え上げ
コンテスト
ユーザー Haijinn
提出日時 2017-08-04 21:58:38
言語 C90
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 471 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 331 ms
コンパイル使用メモリ 39,536 KB
最終ジャッジ日時 2026-02-24 00:50:25
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 10 RE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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;
}
0