結果

問題 No.152 貯金箱の消失
ユーザー cielciel
提出日時 2015-02-16 18:58:24
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,510 ms / 5,000 ms
コード長 104 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 11,232 KB
実行使用メモリ 15,412 KB
最終ジャッジ日時 2023-09-06 01:41:06
合計ジャッジ時間 6,755 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,312 KB
testcase_01 AC 82 ms
15,128 KB
testcase_02 AC 81 ms
15,080 KB
testcase_03 AC 84 ms
15,264 KB
testcase_04 AC 101 ms
15,240 KB
testcase_05 AC 105 ms
15,412 KB
testcase_06 AC 120 ms
15,276 KB
testcase_07 AC 309 ms
15,168 KB
testcase_08 AC 1,486 ms
15,276 KB
testcase_09 AC 1,510 ms
15,348 KB
testcase_10 AC 1,188 ms
15,260 KB
testcase_11 AC 700 ms
15,172 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

L=gets.to_i/4
r=0
2.step(L){|m|(1-m%2).step(m-1,2){|n|next if m.gcd(n)>1
break if 2*m*(m+n)>L
r+=1}}
p r
0