結果

問題 No.1943 消えたAGCT(1)
ユーザー 👑 horiesinitihoriesiniti
提出日時 2023-05-12 20:29:47
言語 Ruby
(3.3.0)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 102 bytes
コンパイル時間 192 ms
コンパイル使用メモリ 11,364 KB
実行使用メモリ 16,988 KB
最終ジャッジ日時 2023-08-19 03:13:54
合計ジャッジ時間 3,853 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
15,280 KB
testcase_01 AC 67 ms
15,184 KB
testcase_02 AC 67 ms
15,060 KB
testcase_03 AC 68 ms
15,324 KB
testcase_04 AC 67 ms
15,112 KB
testcase_05 AC 67 ms
15,320 KB
testcase_06 AC 66 ms
15,264 KB
testcase_07 AC 70 ms
15,296 KB
testcase_08 AC 68 ms
15,104 KB
testcase_09 AC 69 ms
16,636 KB
testcase_10 AC 72 ms
16,732 KB
testcase_11 AC 68 ms
16,572 KB
testcase_12 AC 68 ms
16,860 KB
testcase_13 AC 68 ms
16,096 KB
testcase_14 AC 66 ms
15,352 KB
testcase_15 AC 67 ms
16,592 KB
testcase_16 AC 68 ms
16,776 KB
testcase_17 AC 66 ms
16,464 KB
testcase_18 AC 69 ms
16,680 KB
testcase_19 AC 72 ms
16,664 KB
testcase_20 AC 68 ms
16,528 KB
testcase_21 AC 68 ms
16,764 KB
testcase_22 AC 67 ms
16,948 KB
testcase_23 AC 68 ms
16,680 KB
testcase_24 AC 69 ms
16,988 KB
testcase_25 AC 70 ms
16,584 KB
testcase_26 AC 70 ms
16,860 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i
s=gets.chomp.reverse
ans=s.index(/[AGCT]/,0)
if ans.nil? then
	puts 0
else
	puts n-ans
end
0