結果

問題 No.1943 消えたAGCT(1)
ユーザー hiragnhiragn
提出日時 2022-11-28 10:02:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 256 ms / 2,000 ms
コード長 321 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 31,600 KB
最終ジャッジ日時 2024-04-15 11:31:55
合計ジャッジ時間 3,229 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
10,752 KB
testcase_01 AC 35 ms
10,752 KB
testcase_02 AC 33 ms
10,624 KB
testcase_03 AC 33 ms
10,752 KB
testcase_04 AC 36 ms
10,752 KB
testcase_05 AC 33 ms
10,752 KB
testcase_06 AC 34 ms
10,880 KB
testcase_07 AC 32 ms
10,752 KB
testcase_08 AC 37 ms
10,752 KB
testcase_09 AC 256 ms
31,600 KB
testcase_10 AC 39 ms
11,776 KB
testcase_11 AC 40 ms
11,776 KB
testcase_12 AC 40 ms
11,772 KB
testcase_13 AC 41 ms
11,520 KB
testcase_14 AC 37 ms
10,880 KB
testcase_15 AC 76 ms
14,032 KB
testcase_16 AC 66 ms
13,688 KB
testcase_17 AC 67 ms
13,836 KB
testcase_18 AC 77 ms
14,192 KB
testcase_19 AC 77 ms
14,188 KB
testcase_20 AC 77 ms
14,192 KB
testcase_21 AC 74 ms
14,188 KB
testcase_22 AC 182 ms
25,068 KB
testcase_23 AC 184 ms
25,076 KB
testcase_24 AC 44 ms
11,772 KB
testcase_25 AC 41 ms
11,772 KB
testcase_26 AC 40 ms
11,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import re


def main():
    _ = int(input())
    s = input()

    if all((c not in s) for c in "AGCT"):
        exit(print(0))
    # if re.search(r'[AGCT]+', s) is None:
    #     print(0)

    res_iter = re.finditer(r"[AGCT]", s)
    print(max([x.start() + 1 for x in res_iter]))


if __name__ == "__main__":
    main()
0