結果

問題 No.1943 消えたAGCT(1)
コンテスト
ユーザー Rainkunch
提出日時 2022-05-20 21:34:48
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
TLE  
実行時間 -
コード長 370 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 223 ms
コンパイル使用メモリ 95,952 KB
実行使用メモリ 105,432 KB
最終ジャッジ日時 2026-08-31 15:39:18
合計ジャッジ時間 5,512 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 TLE * 1 -- * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
s = list(input())
counter = 0
A = s.count('A')
G = s.count('G')
C = s.count('C')
T = s.count('T')
while True:
    c = A+G+C+T
    if c == 0: break
    else:
        counter += 1
        think = s.pop(c-1)
        if think == 'A': A -= 1
        elif think == 'G': G -= 1
        elif think == 'C': C -= 1
        elif think == 'T': T -= 1
print(counter)
0