結果
| 問題 |
No.1943 消えたAGCT(1)
|
| コンテスト | |
| ユーザー |
pitP
|
| 提出日時 | 2022-05-20 21:48:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 269 bytes |
| コンパイル時間 | 285 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 31,632 KB |
| 最終ジャッジ日時 | 2024-09-20 07:49:27 |
| 合計ジャッジ時間 | 3,791 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 8 |
ソースコード
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)
if c == 0:
print(0)
exit()
c -= 1
if idx[0] >= c:
print(idx[-1] + 1)
else:
print(idx[-1] - idx[0] + 1)
pitP