結果

問題 No.1943 消えたAGCT(1)
ユーザー first_vilfirst_vil
提出日時 2022-05-22 18:38:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 157 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 11,784 KB
実行使用メモリ 14,424 KB
最終ジャッジ日時 2023-10-20 17:13:10
合計ジャッジ時間 2,891 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,076 KB
testcase_01 AC 26 ms
10,076 KB
testcase_02 AC 26 ms
10,076 KB
testcase_03 AC 24 ms
10,076 KB
testcase_04 AC 24 ms
10,076 KB
testcase_05 AC 25 ms
10,076 KB
testcase_06 AC 26 ms
10,076 KB
testcase_07 AC 26 ms
10,076 KB
testcase_08 AC 25 ms
10,076 KB
testcase_09 AC 34 ms
14,424 KB
testcase_10 AC 73 ms
14,424 KB
testcase_11 AC 100 ms
14,424 KB
testcase_12 AC 65 ms
14,424 KB
testcase_13 AC 102 ms
12,640 KB
testcase_14 AC 26 ms
10,184 KB
testcase_15 AC 33 ms
14,128 KB
testcase_16 AC 32 ms
13,240 KB
testcase_17 AC 33 ms
13,532 KB
testcase_18 AC 36 ms
14,424 KB
testcase_19 AC 35 ms
14,424 KB
testcase_20 AC 35 ms
14,424 KB
testcase_21 AC 34 ms
14,424 KB
testcase_22 AC 34 ms
14,424 KB
testcase_23 AC 33 ms
14,424 KB
testcase_24 AC 111 ms
14,424 KB
testcase_25 AC 110 ms
14,424 KB
testcase_26 AC 76 ms
14,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
s=list(input()[::-1])
m=1e9
for c in "AGCT":
    if c in s and s.index(c)<m:
        m=s.index(c)
if m==1e9:
    print(0)
else:
    print(n-m)
0