結果

問題 No.2035 Tunnel
ユーザー lloyzlloyz
提出日時 2022-08-13 00:55:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 155 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 81,604 KB
実行使用メモリ 77,480 KB
最終ジャッジ日時 2023-10-24 12:56:50
合計ジャッジ時間 2,781 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,400 KB
testcase_01 AC 38 ms
53,400 KB
testcase_02 AC 35 ms
53,400 KB
testcase_03 AC 35 ms
53,400 KB
testcase_04 AC 35 ms
53,400 KB
testcase_05 AC 56 ms
77,464 KB
testcase_06 AC 58 ms
77,464 KB
testcase_07 AC 57 ms
77,480 KB
testcase_08 AC 57 ms
77,344 KB
testcase_09 AC 53 ms
77,344 KB
testcase_10 AC 54 ms
77,460 KB
testcase_11 AC 57 ms
73,788 KB
testcase_12 AC 61 ms
77,188 KB
testcase_13 AC 45 ms
60,224 KB
testcase_14 AC 46 ms
63,408 KB
testcase_15 AC 59 ms
74,288 KB
testcase_16 AC 52 ms
70,544 KB
testcase_17 AC 43 ms
59,548 KB
testcase_18 AC 45 ms
60,052 KB
testcase_19 AC 51 ms
65,888 KB
testcase_20 AC 60 ms
73,876 KB
testcase_21 AC 49 ms
66,236 KB
testcase_22 AC 49 ms
66,320 KB
testcase_23 AC 42 ms
60,548 KB
testcase_24 AC 49 ms
67,520 KB
testcase_25 AC 52 ms
70,660 KB
testcase_26 AC 52 ms
70,296 KB
testcase_27 AC 59 ms
76,608 KB
testcase_28 AC 48 ms
66,488 KB
testcase_29 AC 43 ms
62,652 KB
testcase_30 AC 42 ms
60,392 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