結果

問題 No.781 円周上の格子点の数え上げ
ユーザー 👑 hos.lyrichos.lyric
提出日時 2019-01-19 10:12:38
言語 Crystal
(1.11.2)
結果
AC  
実行時間 296 ms / 2,000 ms
コード長 110 bytes
コンパイル時間 18,030 ms
コンパイル使用メモリ 254,040 KB
実行使用メモリ 165,408 KB
最終ジャッジ日時 2023-09-13 09:58:35
合計ジャッジ時間 24,561 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 262 ms
164,852 KB
testcase_01 AC 285 ms
164,764 KB
testcase_02 AC 257 ms
164,824 KB
testcase_03 AC 273 ms
164,684 KB
testcase_04 AC 270 ms
164,776 KB
testcase_05 AC 265 ms
164,724 KB
testcase_06 AC 268 ms
164,884 KB
testcase_07 AC 267 ms
164,812 KB
testcase_08 AC 257 ms
165,140 KB
testcase_09 AC 274 ms
164,736 KB
testcase_10 AC 260 ms
164,756 KB
testcase_11 AC 267 ms
164,976 KB
testcase_12 AC 268 ms
165,408 KB
testcase_13 AC 296 ms
165,296 KB
testcase_14 AC 259 ms
165,244 KB
testcase_15 AC 254 ms
164,820 KB
testcase_16 AC 260 ms
164,712 KB
testcase_17 AC 276 ms
165,192 KB
testcase_18 AC 259 ms
164,708 KB
testcase_19 AC 249 ms
164,756 KB
testcase_20 AC 263 ms
164,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x,y=gets.not_nil!.split.map &.to_i
n=3200
z=[0]*n*n*3
1.upto(n){|a|n.times{|b|z[a*a+b*b]+=4}}
p z[x,y-x+1].max
0