結果
問題 |
No.1943 消えたAGCT(1)
|
ユーザー |
![]() |
提出日時 | 2022-05-20 22:28:39 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 250 bytes |
コンパイル時間 | 84 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 11,776 KB |
最終ジャッジ日時 | 2024-09-20 08:42:35 |
合計ジャッジ時間 | 1,757 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 WA * 16 |
ソースコード
n = int(input()) s = input() c = sum(s.count(e) for e in "AGCT") - 1 l = max(0, min(s.find(e) for e in "AGCT")) r = max(0, max(s.rfind(e) for e in "AGCT")) if c == 0: print(0) else: # print(c, l, r) print(max(c, l, r) - min(c, l, r) + 1)