結果
問題 | No.436 ccw |
ユーザー | 14番 |
提出日時 | 2016-10-28 22:44:29 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 50 ms / 2,000 ms |
コード長 | 950 bytes |
コンパイル時間 | 2,132 ms |
コンパイル使用メモリ | 101,416 KB |
実行使用メモリ | 22,872 KB |
最終ジャッジ日時 | 2023-08-15 21:10:16 |
合計ジャッジ時間 | 4,771 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 47 ms
20,908 KB |
testcase_01 | AC | 47 ms
20,736 KB |
testcase_02 | AC | 49 ms
20,920 KB |
testcase_03 | AC | 48 ms
22,796 KB |
testcase_04 | AC | 46 ms
18,756 KB |
testcase_05 | AC | 47 ms
20,928 KB |
testcase_06 | AC | 48 ms
22,872 KB |
testcase_07 | AC | 48 ms
22,864 KB |
testcase_08 | AC | 46 ms
20,848 KB |
testcase_09 | AC | 46 ms
18,776 KB |
testcase_10 | AC | 45 ms
20,768 KB |
testcase_11 | AC | 45 ms
22,724 KB |
testcase_12 | AC | 46 ms
20,768 KB |
testcase_13 | AC | 45 ms
20,812 KB |
testcase_14 | AC | 47 ms
20,856 KB |
testcase_15 | AC | 46 ms
20,688 KB |
testcase_16 | AC | 48 ms
22,716 KB |
testcase_17 | AC | 48 ms
22,824 KB |
testcase_18 | AC | 49 ms
20,752 KB |
testcase_19 | AC | 47 ms
18,768 KB |
testcase_20 | AC | 48 ms
20,872 KB |
testcase_21 | AC | 49 ms
20,688 KB |
testcase_22 | AC | 50 ms
20,792 KB |
testcase_23 | AC | 48 ms
20,740 KB |
testcase_24 | AC | 47 ms
20,792 KB |
testcase_25 | AC | 48 ms
20,812 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; public class Program { public void Proc() { Reader.IsDebug = false; string inpt = Reader.ReadLine(); int ans1 = inpt.LastIndexOf('c'); int ans2 = inpt.Length - inpt.IndexOf('w'); Console.WriteLine(Math.Min(ans1, ans2)); } public class Reader { public static bool IsDebug = true; private static System.IO.StringReader SReader; private static string InitText = @" ccccccccwww "; public static string ReadLine() { if(IsDebug) { if(SReader == null) { SReader = new System.IO.StringReader(InitText.Trim()); } return SReader.ReadLine(); } else { return Console.ReadLine(); } } } public static void Main(string[] args) { Program prg = new Program(); prg.Proc(); } }