結果

問題 No.341 沈黙の期間
ユーザー バカらっくバカらっく
提出日時 2018-03-06 10:20:34
言語 Swift
(5.8.1)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 175 bytes
コンパイル時間 438 ms
コンパイル使用メモリ 98,284 KB
実行使用メモリ 7,668 KB
最終ジャッジ日時 2023-08-20 10:34:10
合計ジャッジ時間 1,327 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,540 KB
testcase_01 AC 3 ms
7,500 KB
testcase_02 AC 4 ms
7,524 KB
testcase_03 AC 3 ms
7,532 KB
testcase_04 AC 3 ms
7,516 KB
testcase_05 AC 3 ms
7,532 KB
testcase_06 AC 4 ms
7,500 KB
testcase_07 AC 3 ms
7,504 KB
testcase_08 AC 3 ms
7,652 KB
testcase_09 AC 4 ms
7,524 KB
testcase_10 AC 4 ms
7,632 KB
testcase_11 AC 3 ms
7,504 KB
testcase_12 AC 3 ms
7,284 KB
testcase_13 AC 4 ms
7,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

let inpt = readLine()!

var cnt = 0
var ans = 0
for c in inpt {
    if c=="…" {
        cnt += 1
        ans = max(ans, cnt)
    } else {
        cnt = 0
    }
}
print(ans)
0