結果

問題 No.136 Yet Another GCD Problem
ユーザー finefine
提出日時 2016-03-11 01:19:27
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 208 bytes
コンパイル時間 384 ms
コンパイル使用メモリ 12,024 KB
実行使用メモリ 19,060 KB
最終ジャッジ日時 2023-10-25 04:09:49
合計ジャッジ時間 5,845 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
16,192 KB
testcase_01 AC 88 ms
16,192 KB
testcase_02 AC 88 ms
16,192 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 RE -
testcase_09 AC 86 ms
16,192 KB
testcase_10 RE -
testcase_11 WA -
testcase_12 WA -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 WA -
testcase_17 RE -
testcase_18 WA -
testcase_19 RE -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 87 ms
16,196 KB
testcase_24 WA -
testcase_25 AC 87 ms
16,196 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 87 ms
16,196 KB
testcase_32 WA -
testcase_33 AC 87 ms
16,196 KB
testcase_34 AC 87 ms
16,720 KB
testcase_35 AC 88 ms
16,196 KB
testcase_36 AC 88 ms
16,196 KB
testcase_37 RE -
testcase_38 AC 87 ms
16,196 KB
testcase_39 AC 87 ms
16,196 KB
testcase_40 AC 88 ms
16,196 KB
testcase_41 AC 87 ms
16,196 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def sol a,b
    if a <= b
        return 1
    else
        if a % b == 0
            return a / b
        else
            return sol(a,b + 1)
        end
    end
end

n,k = gets.split.map(&:to_i)
p sol(n,k)
0