結果
| 問題 | No.1943 消えたAGCT(1) |
| コンテスト | |
| ユーザー |
pitP
|
| 提出日時 | 2022-05-20 23:54:44 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 286 bytes |
| 記録 | |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 95,952 KB |
| 実行使用メモリ | 120,832 KB |
| 最終ジャッジ日時 | 2026-08-31 17:57:36 |
| 合計ジャッジ時間 | 4,386 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 10 |
ソースコード
import bisect
n = int(input())
s = input()
idx = []
c = 0
for i in range(n):
if s[i] in ["A","C","G","T"]:
c += 1
idx.append(i+1)
if c == 0:
print(0)
exit()
if c == idx[-1]:
print(c)
elif c < idx[0]:
print(idx[-1])
else:
print(idx[-1]-idx[0]+1)
pitP