結果
| 問題 | No.1943 消えたAGCT(1) |
| コンテスト | |
| ユーザー |
june19312
|
| 提出日時 | 2022-05-20 22:37:57 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 429 bytes |
| 記録 | |
| コンパイル時間 | 278 ms |
| コンパイル使用メモリ | 85,572 KB |
| 実行使用メモリ | 84,880 KB |
| 最終ジャッジ日時 | 2026-04-08 20:29:37 |
| 合計ジャッジ時間 | 4,644 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 TLE * 1 -- * 14 |
ソースコード
n = int(input())
s = input()
AGCT = ["A","G","C","T"]
tmp = [True]*(len(s))
cnt = 0
for i,v in enumerate(s):
if v in AGCT:
cnt+=1
ans = 0
while cnt>0:
tmp2 = cnt-1
flag = True
while flag:
if tmp[tmp2]:
tmp[tmp2]=False
if s[tmp2] in AGCT:
cnt-=1
ans+=1
flag = False
break
else:
tmp2+=1
print(ans)
june19312