結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,600 KB
testcase_01 AC 153 ms
15,372 KB
testcase_02 AC 188 ms
15,476 KB
testcase_03 AC 188 ms
15,476 KB
testcase_04 AC 77 ms
15,576 KB
testcase_05 AC 76 ms
15,648 KB
testcase_06 AC 83 ms
15,640 KB
testcase_07 AC 110 ms
15,480 KB
testcase_08 AC 77 ms
15,404 KB
testcase_09 AC 78 ms
15,668 KB
testcase_10 AC 77 ms
15,640 KB
testcase_11 AC 89 ms
15,708 KB
testcase_12 AC 79 ms
15,456 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 77 ms
15,560 KB
testcase_23 WA -
testcase_24 AC 77 ms
15,688 KB
testcase_25 AC 77 ms
15,640 KB
testcase_26 AC 80 ms
15,604 KB
testcase_27 AC 78 ms
15,400 KB
testcase_28 AC 78 ms
15,600 KB
testcase_29 AC 78 ms
15,680 KB
testcase_30 AC 92 ms
15,412 KB
testcase_31 WA -
testcase_32 AC 89 ms
15,480 KB
testcase_33 AC 115 ms
15,620 KB
testcase_34 AC 114 ms
15,596 KB
testcase_35 AC 83 ms
15,376 KB
testcase_36 AC 82 ms
15,504 KB
testcase_37 AC 81 ms
15,584 KB
testcase_38 WA -
testcase_39 AC 80 ms
15,456 KB
testcase_40 AC 80 ms
15,672 KB
testcase_41 AC 80 ms
15,420 KB
testcase_42 AC 83 ms
15,548 KB
testcase_43 AC 82 ms
15,572 KB
testcase_44 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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%2==0 ? n/2 : n
0