結果

問題 No.1951 消えたAGCT(2)
ユーザー 👑 H20H20
提出日時 2022-03-24 00:10:16
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 364 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 268,480 KB
最終ジャッジ日時 2023-09-09 03:31:24
合計ジャッジ時間 6,927 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,384 KB
testcase_01 AC 73 ms
71,068 KB
testcase_02 AC 71 ms
71,244 KB
testcase_03 AC 71 ms
71,104 KB
testcase_04 AC 72 ms
71,268 KB
testcase_05 AC 74 ms
71,268 KB
testcase_06 AC 73 ms
71,072 KB
testcase_07 AC 72 ms
71,184 KB
testcase_08 AC 350 ms
188,460 KB
testcase_09 AC 109 ms
94,844 KB
testcase_10 AC 178 ms
139,424 KB
testcase_11 AC 358 ms
205,952 KB
testcase_12 AC 132 ms
106,596 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
s = list(input())
while s.count('A')+s.count('G')+s.count('C')+s.count('T'):
    cnt = s.count('A')+s.count('G')+s.count('C')+s.count('T')
    t = []
    for i,c in enumerate(s):
        if i!=cnt-1:
            t.append(c)
    r = t.count(s[cnt-1])
    for i in range(len(t)):
        t[i] = chr((ord(t[i])-65+r)%26+65)
    s = t
print(n-len(s))
0