結果

問題 No.2035 Tunnel
ユーザー 👑 rin204rin204
提出日時 2022-08-15 20:03:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 130 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 82,348 KB
実行使用メモリ 76,496 KB
最終ジャッジ日時 2024-04-10 06:47:07
合計ジャッジ時間 2,849 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,132 KB
testcase_01 AC 33 ms
51,944 KB
testcase_02 AC 33 ms
52,432 KB
testcase_03 AC 33 ms
52,616 KB
testcase_04 AC 32 ms
51,836 KB
testcase_05 AC 52 ms
76,072 KB
testcase_06 AC 54 ms
76,496 KB
testcase_07 AC 53 ms
76,256 KB
testcase_08 AC 49 ms
76,084 KB
testcase_09 AC 42 ms
60,212 KB
testcase_10 AC 43 ms
60,444 KB
testcase_11 AC 51 ms
75,808 KB
testcase_12 AC 53 ms
76,176 KB
testcase_13 AC 42 ms
61,172 KB
testcase_14 AC 43 ms
64,364 KB
testcase_15 AC 52 ms
75,816 KB
testcase_16 AC 47 ms
71,980 KB
testcase_17 AC 40 ms
59,284 KB
testcase_18 AC 39 ms
61,684 KB
testcase_19 AC 41 ms
66,376 KB
testcase_20 AC 49 ms
75,572 KB
testcase_21 AC 42 ms
66,160 KB
testcase_22 AC 45 ms
68,704 KB
testcase_23 AC 39 ms
62,296 KB
testcase_24 AC 43 ms
70,928 KB
testcase_25 AC 46 ms
73,028 KB
testcase_26 AC 45 ms
71,172 KB
testcase_27 AC 53 ms
75,872 KB
testcase_28 AC 44 ms
68,136 KB
testcase_29 AC 40 ms
62,376 KB
testcase_30 AC 40 ms
61,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
S = input()
ans = -1
for i, s in enumerate(S[::-1], 1):
    if s == "#":
        ans = max(ans + 2, i)
print(ans)
0