結果
| 問題 | No.1943 消えたAGCT(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-03 12:55:17 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 290 bytes |
| 記録 | |
| コンパイル時間 | 273 ms |
| コンパイル使用メモリ | 95,724 KB |
| 実行使用メモリ | 104,192 KB |
| 最終ジャッジ日時 | 2026-08-24 20:06:21 |
| 合計ジャッジ時間 | 5,620 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 TLE * 1 -- * 14 |
ソースコード
N = int(input())
S = list(input())
cnt = 0
for i in range(N):
if S[i] in "AGCT":
cnt += 1
if cnt == 0:
print(0)
exit()
ans = 0
while True:
ans += 1
p = S.pop(cnt - 1)
if p in "AGCT":
cnt -= 1
if cnt == 0:
break
print(ans)