結果
| 問題 | 
                            No.725 木は明らかに森である
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2019-05-02 23:56:58 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1 ms / 2,000 ms | 
| コード長 | 262 bytes | 
| コンパイル時間 | 365 ms | 
| コンパイル使用メモリ | 20,480 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-31 13:55:43 | 
| 合計ジャッジ時間 | 930 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 9 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         fgets(S, 101, stdin);
      |         ^~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#include <string.h>
int main()
{
	char S[101];
	fgets(S, 101, stdin);
	char *t, *s;
	for (s = S; (t = strstr(s, "treeone")) != NULL; s = t+7) {
		fwrite(s, 1, t-s, stdout);
		fwrite("forest", 1, 6, stdout);
	}
	fputs(s, stdout);
	return 0;
}