結果
問題 |
No.312 置換処理
|
ユーザー |
![]() |
提出日時 | 2015-12-05 00:18:23 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 177 bytes |
コンパイル時間 | 48 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-09-14 14:06:38 |
合計ジャッジ時間 | 5,652 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 44 WA * 1 |
コンパイルメッセージ
Syntax OK
ソースコード
n = gets.to_i nh = Math.sqrt(n).to_i x = 0 3.upto(nh) do |y| x = y if n % x == 0 puts x exit end end if n % 2 == 0 puts n / 2 exit end puts n