結果

問題 No.395 永遠の17歳
ユーザー maimai
提出日時 2016-07-15 22:27:51
言語 Ruby
(3.2.2)
結果
AC  
実行時間 84 ms / 1,000 ms
コード長 122 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 11,436 KB
実行使用メモリ 15,308 KB
最終ジャッジ日時 2023-07-27 21:49:08
合計ジャッジ時間 2,437 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,152 KB
testcase_01 AC 79 ms
15,292 KB
testcase_02 AC 77 ms
15,156 KB
testcase_03 AC 79 ms
15,192 KB
testcase_04 AC 80 ms
15,140 KB
testcase_05 AC 80 ms
15,088 KB
testcase_06 AC 84 ms
15,072 KB
testcase_07 AC 79 ms
15,308 KB
testcase_08 AC 80 ms
15,036 KB
testcase_09 AC 79 ms
15,308 KB
testcase_10 AC 80 ms
15,144 KB
testcase_11 AC 79 ms
15,208 KB
testcase_12 AC 78 ms
15,088 KB
testcase_13 AC 78 ms
15,216 KB
testcase_14 AC 80 ms
15,156 KB
testcase_15 AC 82 ms
15,076 KB
testcase_16 AC 78 ms
15,156 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Main.rb:13: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

a=gets.to_i
if a==0
    p -1
    exit
end
1.upto(100){|i|
    if a/i==1 && a%i==7
        p i
        exit
    end
}

p -1
0