結果
問題 | No.341 沈黙の期間 |
ユーザー | tasuku |
提出日時 | 2016-02-13 01:47:57 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 25 ms / 5,000 ms |
コード長 | 814 bytes |
コンパイル時間 | 865 ms |
コンパイル使用メモリ | 106,344 KB |
実行使用メモリ | 23,680 KB |
最終ジャッジ日時 | 2023-10-22 04:47:08 |
合計ジャッジ時間 | 1,847 ms |
ジャッジサーバーID (参考情報) |
judge9 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 24 ms
23,680 KB |
testcase_01 | AC | 24 ms
23,680 KB |
testcase_02 | AC | 24 ms
23,680 KB |
testcase_03 | AC | 23 ms
23,680 KB |
testcase_04 | AC | 24 ms
23,680 KB |
testcase_05 | AC | 24 ms
23,680 KB |
testcase_06 | AC | 23 ms
23,680 KB |
testcase_07 | AC | 23 ms
23,680 KB |
testcase_08 | AC | 24 ms
23,680 KB |
testcase_09 | AC | 23 ms
23,680 KB |
testcase_10 | AC | 25 ms
23,680 KB |
testcase_11 | AC | 24 ms
23,680 KB |
testcase_12 | AC | 24 ms
23,680 KB |
testcase_13 | AC | 24 ms
23,680 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.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication4 { class Program { static void Main(string[] args) { const char ELLIPSIS = '…'; string s = Console.ReadLine(); int cnt = 0; int maxCnt = 0; for (int i = 0; i < s.Length; i++) { if (s[i] == ELLIPSIS) { cnt++; if (cnt > maxCnt) { maxCnt = cnt; } } else { cnt = 0; } } Console.WriteLine(maxCnt); } } }