結果

問題 No.2035 Tunnel
ユーザー lloyzlloyz
提出日時 2022-08-13 00:55:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 188 ms / 2,000 ms
コード長 155 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 11,684 KB
実行使用メモリ 14,496 KB
最終ジャッジ日時 2023-10-24 12:57:25
合計ジャッジ時間 3,902 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,940 KB
testcase_01 AC 28 ms
9,940 KB
testcase_02 AC 27 ms
9,940 KB
testcase_03 AC 27 ms
9,940 KB
testcase_04 AC 26 ms
9,940 KB
testcase_05 AC 163 ms
14,496 KB
testcase_06 AC 165 ms
14,496 KB
testcase_07 AC 161 ms
14,496 KB
testcase_08 AC 66 ms
14,496 KB
testcase_09 AC 70 ms
14,496 KB
testcase_10 AC 188 ms
14,496 KB
testcase_11 AC 108 ms
13,748 KB
testcase_12 AC 124 ms
14,424 KB
testcase_13 AC 39 ms
10,344 KB
testcase_14 AC 56 ms
11,180 KB
testcase_15 AC 117 ms
13,908 KB
testcase_16 AC 97 ms
12,856 KB
testcase_17 AC 29 ms
10,032 KB
testcase_18 AC 35 ms
10,132 KB
testcase_19 AC 63 ms
11,324 KB
testcase_20 AC 112 ms
13,784 KB
testcase_21 AC 79 ms
11,704 KB
testcase_22 AC 77 ms
11,732 KB
testcase_23 AC 47 ms
10,608 KB
testcase_24 AC 95 ms
12,288 KB
testcase_25 AC 119 ms
12,896 KB
testcase_26 AC 111 ms
12,772 KB
testcase_27 AC 152 ms
13,976 KB
testcase_28 AC 84 ms
11,780 KB
testcase_29 AC 48 ms
10,664 KB
testcase_30 AC 45 ms
10,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
S = list(input())

S = S[::-1]
ans = -1
for i in range(n):
    if S[i] == '#':
        x = i + 1
        ans = max(ans + 2, x)
print(ans)
0