結果

問題 No.1943 消えたAGCT(1)
ユーザー JF1HNL
提出日時 2022-05-22 19:37:23
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 313 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 292,388 KB
最終ジャッジ日時 2024-09-20 12:49:47
合計ジャッジ時間 4,326 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 TLE * 1 -- * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
n = int(input())
s = list(input())
scnt = Counter(s)
ans = 0
A = "A"
G = "G"
C = "C"
T = "T"

while True:
  agctcnt = scnt[A] + scnt[G] + scnt[C] + scnt[T]
  if agctcnt == 0:
    print(ans)
    break
  
  s[agctcnt - 1] = ""
  s = list("".join(s))
  scnt = Counter(s)
  ans += 1
  
0