結果
| 問題 |
No.1943 消えたAGCT(1)
|
| コンテスト | |
| ユーザー |
Rainkunch
|
| 提出日時 | 2022-05-20 21:34:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 370 bytes |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 81,980 KB |
| 実行使用メモリ | 102,272 KB |
| 最終ジャッジ日時 | 2024-09-20 07:26:58 |
| 合計ジャッジ時間 | 4,381 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 TLE * 1 -- * 14 |
ソースコード
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)
Rainkunch