結果

問題 No.791 うし数列
ユーザー fshutofshuto
提出日時 2019-04-09 06:44:30
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 111 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 11,300 KB
実行使用メモリ 15,332 KB
最終ジャッジ日時 2023-09-14 15:48:49
合計ジャッジ時間 2,441 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
15,232 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 85 ms
15,256 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 83 ms
15,120 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 83 ms
15,036 KB
testcase_13 AC 83 ms
14,996 KB
testcase_14 AC 83 ms
15,052 KB
testcase_15 AC 83 ms
15,208 KB
testcase_16 AC 83 ms
15,072 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.chomp
ns = []
(1..100).each do |i|
  ns << '1' + '3' * i
end
ans = ns.index(N) + 1
puts ans ? ans : -1
0