結果
| 問題 | 
                            No.279 木の数え上げ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Haijinn
                         | 
                    
| 提出日時 | 2017-08-04 22:07:57 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 433 bytes | 
| コンパイル時間 | 129 ms | 
| コンパイル使用メモリ | 21,632 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-11 20:57:34 | 
| 合計ジャッジ時間 | 1,015 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 21 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:14:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 | 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[1000000];
scanf("%s",s);
for(i=0;i<strlen(s);i++){
	
		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;
}
            
            
            
        
            
Haijinn