結果

問題 No.152 貯金箱の消失
ユーザー %20%20
提出日時 2018-07-23 13:19:14
言語 Ruby
(3.3.0)
結果
AC  
実行時間 199 ms / 5,000 ms
コード長 112 bytes
コンパイル時間 493 ms
コンパイル使用メモリ 11,468 KB
実行使用メモリ 24,396 KB
最終ジャッジ日時 2023-08-27 02:28:11
合計ジャッジ時間 3,225 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
15,584 KB
testcase_01 AC 87 ms
15,444 KB
testcase_02 AC 85 ms
15,380 KB
testcase_03 AC 84 ms
15,432 KB
testcase_04 AC 85 ms
15,640 KB
testcase_05 AC 85 ms
15,680 KB
testcase_06 AC 88 ms
15,776 KB
testcase_07 AC 106 ms
17,324 KB
testcase_08 AC 196 ms
24,300 KB
testcase_09 AC 199 ms
24,396 KB
testcase_10 AC 172 ms
22,324 KB
testcase_11 AC 135 ms
19,400 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

l=gets.to_i/8
z=0
(1..l**0.5).map{|m|
	(1...m).map{|n|
		z+=1 if m-n&1==1 && m*m+m*n<=l && m.gcd(n)==1
	}
}
p z
0