結果
| 問題 |
No.1943 消えたAGCT(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-02 16:19:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 78 ms / 2,000 ms |
| コード長 | 388 bytes |
| コンパイル時間 | 99 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,904 KB |
| 最終ジャッジ日時 | 2024-07-17 05:35:23 |
| 合計ジャッジ時間 | 2,745 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
from collections import Counter
def main():
n = int(input())
S = input()
S_counter = Counter(S)
a_idx = S.rfind("A")
g_idx = S.rfind("G")
c_idx = S.rfind("C")
t_idx = S.rfind("T")
most_far_idx = max(a_idx, g_idx, c_idx, t_idx)
if most_far_idx == -1:
print(0)
return
print(most_far_idx+1)
if __name__ == "__main__":
main()