結果

問題 No.1943 消えたAGCT(1)
ユーザー akasia_midoriakasia_midori
提出日時 2022-05-20 21:55:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 439 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 81,612 KB
実行使用メモリ 76,084 KB
最終ジャッジ日時 2023-10-20 12:30:08
合計ジャッジ時間 3,090 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
53,416 KB
testcase_01 AC 41 ms
53,416 KB
testcase_02 AC 41 ms
53,416 KB
testcase_03 AC 41 ms
53,416 KB
testcase_04 AC 44 ms
53,416 KB
testcase_05 AC 43 ms
53,416 KB
testcase_06 AC 43 ms
53,416 KB
testcase_07 AC 43 ms
53,416 KB
testcase_08 AC 42 ms
53,416 KB
testcase_09 AC 79 ms
76,084 KB
testcase_10 AC 79 ms
76,084 KB
testcase_11 AC 82 ms
76,084 KB
testcase_12 AC 81 ms
76,084 KB
testcase_13 AC 71 ms
75,688 KB
testcase_14 AC 47 ms
61,524 KB
testcase_15 AC 81 ms
75,988 KB
testcase_16 AC 75 ms
75,924 KB
testcase_17 AC 78 ms
75,992 KB
testcase_18 AC 86 ms
76,084 KB
testcase_19 AC 83 ms
76,084 KB
testcase_20 AC 82 ms
76,084 KB
testcase_21 AC 83 ms
76,084 KB
testcase_22 AC 82 ms
76,084 KB
testcase_23 AC 80 ms
76,084 KB
testcase_24 AC 83 ms
76,084 KB
testcase_25 AC 80 ms
76,084 KB
testcase_26 AC 81 ms
76,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def oi(): return int(input())
def os(): return input()
def mi(): return list(map(int, input().split()))

from collections import Counter

input_count = 0
N = oi()
S = os()

scounter = Counter(S)

ind = 0
if "A" in scounter:
    ind = max(S.rindex("A")+1, ind)
if "G" in scounter:
    ind = max(S.rindex("G")+1, ind)
if "C" in scounter:
    ind = max(S.rindex("C")+1, ind)
if "T" in scounter:
    ind = max(S.rindex("T")+1, ind)

print(ind)
0