結果
問題 | No.725 木は明らかに森である |
ユーザー | ngtkana |
提出日時 | 2020-02-10 12:56:24 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 649 bytes |
コンパイル時間 | 963 ms |
コンパイル使用メモリ | 109,180 KB |
実行使用メモリ | 24,768 KB |
最終ジャッジ日時 | 2024-04-08 12:57:53 |
合計ジャッジ時間 | 1,809 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 27 ms
24,640 KB |
testcase_01 | AC | 27 ms
24,640 KB |
testcase_02 | AC | 27 ms
24,512 KB |
testcase_03 | AC | 31 ms
24,640 KB |
testcase_04 | AC | 27 ms
24,640 KB |
testcase_05 | AC | 28 ms
24,640 KB |
testcase_06 | AC | 27 ms
24,512 KB |
testcase_07 | AC | 27 ms
24,768 KB |
testcase_08 | AC | 28 ms
24,768 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; using System.Collections.Generic; static class NagataKanaIsAGenius { public static void Main() { char[]s=Console.ReadLine().ToArray(); int n=s.Length; List<char>ans=new List<char>(); for(int i=0;i<n;){ if(i<=n-7&&new String(s,i,7)=="treeone"){ foreach(char c in "forest"){ ans.Add(c); } i+=7; }else{ ans.Add(s[i]); i++; } } foreach(char c in ans){ Console.Write(c); } Console.WriteLine(""); } }