結果

問題 No.1943 消えたAGCT(1)
ユーザー JF1HNLJF1HNL
提出日時 2022-05-22 20:06:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 81,840 KB
実行使用メモリ 98,144 KB
最終ジャッジ日時 2023-10-20 17:16:51
合計ジャッジ時間 3,407 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,588 KB
testcase_01 AC 39 ms
53,588 KB
testcase_02 AC 40 ms
53,588 KB
testcase_03 AC 40 ms
53,588 KB
testcase_04 AC 40 ms
53,588 KB
testcase_05 AC 42 ms
53,588 KB
testcase_06 AC 40 ms
53,588 KB
testcase_07 AC 44 ms
53,588 KB
testcase_08 AC 42 ms
53,588 KB
testcase_09 AC 88 ms
98,132 KB
testcase_10 AC 85 ms
98,080 KB
testcase_11 AC 86 ms
98,132 KB
testcase_12 AC 80 ms
98,080 KB
testcase_13 AC 73 ms
89,988 KB
testcase_14 AC 44 ms
61,800 KB
testcase_15 AC 92 ms
97,676 KB
testcase_16 AC 83 ms
93,800 KB
testcase_17 AC 88 ms
95,004 KB
testcase_18 AC 91 ms
98,136 KB
testcase_19 AC 93 ms
98,140 KB
testcase_20 AC 92 ms
98,140 KB
testcase_21 AC 93 ms
98,144 KB
testcase_22 AC 94 ms
98,144 KB
testcase_23 AC 98 ms
98,140 KB
testcase_24 AC 89 ms
98,136 KB
testcase_25 AC 90 ms
98,136 KB
testcase_26 AC 89 ms
98,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
n = int(input())
s = list(input())

agctcnt = 0
agctset = set(["A", "G", "C", "T"])

agctmaxindex = -1

for index, it in enumerate(s):
  if it in agctset:
    agctcnt += 1
    agctmaxindex = index

print(agctmaxindex + 1)
0