結果

問題 No.1943 消えたAGCT(1)
ユーザー JF1HNLJF1HNL
提出日時 2022-05-22 19:37:23
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 313 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 81,804 KB
実行使用メモリ 55,536 KB
最終ジャッジ日時 2023-10-20 17:15:12
合計ジャッジ時間 5,048 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,568 KB
testcase_01 AC 38 ms
53,488 KB
testcase_02 AC 39 ms
55,536 KB
testcase_03 AC 37 ms
53,488 KB
testcase_04 AC 37 ms
53,488 KB
testcase_05 AC 38 ms
53,488 KB
testcase_06 AC 38 ms
55,536 KB
testcase_07 AC 38 ms
55,536 KB
testcase_08 AC 38 ms
53,488 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
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 -- -
権限があれば一括ダウンロードができます

ソースコード

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