結果
問題 | No.418 ミンミンゼミ |
ユーザー | rtomp |
提出日時 | 2016-09-20 16:15:43 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 59 ms / 1,000 ms |
コード長 | 1,766 bytes |
コンパイル時間 | 3,186 ms |
コンパイル使用メモリ | 110,660 KB |
実行使用メモリ | 23,368 KB |
最終ジャッジ日時 | 2023-09-23 00:59:49 |
合計ジャッジ時間 | 5,389 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 58 ms
23,368 KB |
testcase_01 | AC | 59 ms
21,216 KB |
testcase_02 | AC | 59 ms
23,312 KB |
testcase_03 | AC | 59 ms
19,280 KB |
testcase_04 | AC | 59 ms
23,260 KB |
testcase_05 | AC | 59 ms
21,352 KB |
testcase_06 | AC | 58 ms
23,316 KB |
testcase_07 | AC | 59 ms
21,220 KB |
testcase_08 | AC | 58 ms
21,152 KB |
testcase_09 | AC | 58 ms
23,256 KB |
testcase_10 | AC | 58 ms
21,228 KB |
testcase_11 | AC | 58 ms
19,184 KB |
testcase_12 | AC | 58 ms
21,216 KB |
testcase_13 | AC | 58 ms
21,328 KB |
testcase_14 | AC | 59 ms
21,212 KB |
testcase_15 | AC | 58 ms
21,280 KB |
testcase_16 | AC | 57 ms
19,328 KB |
testcase_17 | AC | 58 ms
21,228 KB |
testcase_18 | AC | 58 ms
21,304 KB |
testcase_19 | AC | 57 ms
21,288 KB |
testcase_20 | AC | 58 ms
19,492 KB |
testcase_21 | AC | 57 ms
19,124 KB |
testcase_22 | AC | 58 ms
21,316 KB |
testcase_23 | AC | 57 ms
21,308 KB |
testcase_24 | AC | 59 ms
21,216 KB |
testcase_25 | AC | 57 ms
19,324 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.Collections.Generic; using System.IO; using System.Linq; public class YukiCoder { public static void Solve() { string S = MyConsole.String(); S = S.Replace( "-", ""); string[] strs = S.Split( new []{"m"}, StringSplitOptions.RemoveEmptyEntries ); int ans = strs.Count( s => s.Equals( "in" ) ); MyConsole.wLine( ans.ToString() ); } public static void Main() { MyConsole.Read(); Solve(); MyConsole.Finish(); } } public static class MyConsole { private static List<string> ReadedLine = new List<string>(); private static char[] buf = new char[1024]; private static int i; public static void Read() { TextReader sr = Console.In; int Len = sr.Read( buf, 0, 1024 ); var Line = string.Empty; for (int i = 0 ; i < Len ; i++) { if (buf[i] >= 33 && buf[i] <= 126) { Line += buf[i]; } else if (Line.Length > 0) { ReadedLine.Add( Line ); Line = string.Empty; } } if (Line.Length > 0) ReadedLine.Add( Line ); Console.SetOut( new StreamWriter( Console.OpenStandardOutput() ) { AutoFlush = false } ); } public static string String() { return ReadedLine[i++]; } public static int Int() { return int.Parse( ReadedLine[i++] ); } public static long Long() { return long.Parse( ReadedLine[i++] ); } public static double Double() { return double.Parse( ReadedLine[i++] ); } public static void wLine( string output = null ) { Console.WriteLine( output ); } public static void Finish() { Console.Out.Flush(); } }