結果

問題 No.2035 Tunnel
ユーザー titiatitia
提出日時 2022-08-13 00:17:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 181 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 11,640 KB
実行使用メモリ 10,504 KB
最終ジャッジ日時 2023-10-24 12:30:42
合計ジャッジ時間 3,882 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,844 KB
testcase_01 AC 28 ms
9,844 KB
testcase_02 AC 27 ms
9,844 KB
testcase_03 AC 28 ms
9,844 KB
testcase_04 AC 28 ms
9,844 KB
testcase_05 AC 161 ms
10,504 KB
testcase_06 AC 159 ms
10,504 KB
testcase_07 AC 162 ms
10,504 KB
testcase_08 AC 66 ms
10,504 KB
testcase_09 AC 70 ms
10,504 KB
testcase_10 AC 181 ms
10,504 KB
testcase_11 AC 106 ms
10,300 KB
testcase_12 AC 122 ms
10,500 KB
testcase_13 AC 38 ms
9,936 KB
testcase_14 AC 52 ms
9,988 KB
testcase_15 AC 111 ms
10,332 KB
testcase_16 AC 92 ms
10,204 KB
testcase_17 AC 29 ms
9,852 KB
testcase_18 AC 34 ms
9,892 KB
testcase_19 AC 59 ms
9,988 KB
testcase_20 AC 107 ms
10,300 KB
testcase_21 AC 77 ms
9,988 KB
testcase_22 AC 77 ms
9,988 KB
testcase_23 AC 46 ms
9,936 KB
testcase_24 AC 97 ms
10,128 KB
testcase_25 AC 114 ms
10,208 KB
testcase_26 AC 110 ms
10,188 KB
testcase_27 AC 146 ms
10,472 KB
testcase_28 AC 83 ms
10,060 KB
testcase_29 AC 47 ms
9,960 KB
testcase_30 AC 44 ms
9,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())
S=input().strip()

MAX=-1

for i in range(N-1,-1,-1):
    if S[i]=="#":
        MAX=max(MAX+2,N-i)

print(MAX)
0