結果
問題 |
No.725 木は明らかに森である
|
ユーザー |
![]() |
提出日時 | 2020-02-10 12:56:24 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 23 ms / 2,000 ms |
コード長 | 649 bytes |
コンパイル時間 | 827 ms |
コンパイル使用メモリ | 104,960 KB |
実行使用メモリ | 18,432 KB |
最終ジャッジ日時 | 2024-10-01 06:21:29 |
合計ジャッジ時間 | 1,544 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
コンパイルメッセージ
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(""); } }