結果

問題 No.312 置換処理
ユーザー letrangerletranger
提出日時 2017-04-09 01:25:03
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 104 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 11,436 KB
実行使用メモリ 15,760 KB
最終ジャッジ日時 2023-09-24 23:41:20
合計ジャッジ時間 6,640 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 132 ms
15,480 KB
testcase_02 AC 155 ms
15,560 KB
testcase_03 AC 154 ms
15,628 KB
testcase_04 AC 80 ms
15,684 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 83 ms
15,484 KB
testcase_23 WA -
testcase_24 AC 82 ms
15,536 KB
testcase_25 AC 81 ms
15,560 KB
testcase_26 AC 81 ms
15,604 KB
testcase_27 AC 81 ms
15,420 KB
testcase_28 AC 81 ms
15,536 KB
testcase_29 AC 81 ms
15,696 KB
testcase_30 AC 92 ms
15,480 KB
testcase_31 WA -
testcase_32 AC 87 ms
15,412 KB
testcase_33 AC 103 ms
15,480 KB
testcase_34 AC 103 ms
15,592 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 83 ms
15,464 KB
testcase_44 AC 83 ms
15,460 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def f(n)
  (n**0.5).floor.downto(1){|i|
    return n / i if n % i == 0
  }
end

N = gets.to_i
puts f(N)
0