結果

問題 No.152 貯金箱の消失
ユーザー 👑 hos.lyrichos.lyric
提出日時 2015-02-16 20:28:12
言語 Ruby
(3.3.0)
結果
AC  
実行時間 768 ms / 5,000 ms
コード長 84 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 11,552 KB
実行使用メモリ 15,344 KB
最終ジャッジ日時 2023-08-27 05:29:23
合計ジャッジ時間 4,302 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,084 KB
testcase_01 AC 84 ms
15,140 KB
testcase_02 AC 81 ms
15,280 KB
testcase_03 AC 84 ms
15,016 KB
testcase_04 AC 92 ms
15,264 KB
testcase_05 AC 93 ms
15,192 KB
testcase_06 AC 102 ms
15,240 KB
testcase_07 AC 193 ms
15,232 KB
testcase_08 AC 764 ms
15,224 KB
testcase_09 AC 768 ms
15,124 KB
testcase_10 AC 622 ms
15,344 KB
testcase_11 AC 391 ms
15,240 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

l=gets.to_i/8
a=0
1.upto(l){|m|a+=(m+1..[m+m,l/m].min).count{|s|s.gcd(s-m-m)<2}}
p a
0