結果

問題 No.312 置換処理
ユーザー urutomurutom
提出日時 2017-04-17 18:41:58
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 106 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 11,304 KB
実行使用メモリ 15,668 KB
最終ジャッジ日時 2023-09-26 10:52:16
合計ジャッジ時間 5,795 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,372 KB
testcase_01 AC 153 ms
15,344 KB
testcase_02 AC 188 ms
15,576 KB
testcase_03 AC 196 ms
15,532 KB
testcase_04 AC 82 ms
15,612 KB
testcase_05 AC 81 ms
15,396 KB
testcase_06 AC 87 ms
15,588 KB
testcase_07 AC 114 ms
15,492 KB
testcase_08 AC 81 ms
15,564 KB
testcase_09 AC 80 ms
15,408 KB
testcase_10 AC 81 ms
15,348 KB
testcase_11 AC 94 ms
15,396 KB
testcase_12 AC 81 ms
15,484 KB
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 81 ms
15,492 KB
testcase_23 AC 81 ms
15,520 KB
testcase_24 AC 80 ms
15,612 KB
testcase_25 AC 81 ms
15,620 KB
testcase_26 AC 80 ms
15,536 KB
testcase_27 AC 81 ms
15,480 KB
testcase_28 AC 80 ms
15,372 KB
testcase_29 AC 80 ms
15,600 KB
testcase_30 AC 95 ms
15,352 KB
testcase_31 AC 99 ms
15,372 KB
testcase_32 AC 90 ms
15,596 KB
testcase_33 AC 111 ms
15,352 KB
testcase_34 AC 116 ms
15,500 KB
testcase_35 AC 83 ms
15,560 KB
testcase_36 AC 81 ms
15,368 KB
testcase_37 AC 80 ms
15,484 KB
testcase_38 AC 80 ms
15,588 KB
testcase_39 AC 80 ms
15,380 KB
testcase_40 AC 84 ms
15,368 KB
testcase_41 AC 80 ms
15,492 KB
testcase_42 AC 79 ms
15,540 KB
testcase_43 AC 82 ms
15,408 KB
testcase_44 AC 78 ms
15,568 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i
3.step(n**0.5,2){|i|
	if n%i==0
		puts i.to_i
		exit
	end
}
puts n%4==0 ? 4 : n%2==0 ? n/2 : n
0