結果

問題 No.800 四平方定理
ユーザー 👑 tatt61880tatt61880
提出日時 2020-04-25 15:37:33
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 459 bytes
コンパイル時間 2,097 ms
コンパイル使用メモリ 147,516 KB
実行使用メモリ 128,664 KB
最終ジャッジ日時 2023-10-14 16:32:48
合計ジャッジ時間 6,368 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
128,492 KB
testcase_01 AC 37 ms
128,488 KB
testcase_02 AC 37 ms
128,512 KB
testcase_03 AC 37 ms
128,576 KB
testcase_04 AC 35 ms
128,340 KB
testcase_05 AC 35 ms
128,580 KB
testcase_06 AC 37 ms
128,512 KB
testcase_07 AC 36 ms
128,592 KB
testcase_08 AC 37 ms
128,492 KB
testcase_09 AC 37 ms
128,512 KB
testcase_10 AC 78 ms
128,512 KB
testcase_11 AC 84 ms
128,520 KB
testcase_12 AC 86 ms
128,508 KB
testcase_13 AC 76 ms
128,512 KB
testcase_14 AC 84 ms
128,364 KB
testcase_15 AC 86 ms
128,516 KB
testcase_16 AC 84 ms
128,472 KB
testcase_17 AC 83 ms
128,520 KB
testcase_18 AC 89 ms
128,564 KB
testcase_19 AC 89 ms
128,512 KB
testcase_20 AC 35 ms
128,516 KB
testcase_21 AC 34 ms
128,452 KB
testcase_22 AC 91 ms
128,464 KB
testcase_23 AC 144 ms
128,448 KB
testcase_24 AC 135 ms
128,616 KB
testcase_25 AC 145 ms
128,588 KB
testcase_26 AC 35 ms
128,520 KB
testcase_27 AC 36 ms
128,348 KB
testcase_28 AC 132 ms
128,460 KB
testcase_29 AC 143 ms
128,592 KB
testcase_30 AC 134 ms
128,664 KB
testcase_31 AC 127 ms
128,560 KB
testcase_32 AC 136 ms
128,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var d: int :: cui@inputInt()
	var xy: []int :: #[2 * 2000 ^ 2 + 1]int
	var zwd: []int :: #[2 * 2000 ^ 2 + 1]int
	for x(1, n)
		for y(1, n)
			do xy[x ^ 2 + y ^ 2] :+ 1
		end for
	end for
	for z(1, n)
		for w(1, n)
			var v: int :: w ^ 2 - z ^ 2 + d
			if(v > 0)
				do zwd[v] :+ 1
			end if
		end for
	end for
	var ans: int
	for i(1, 2 * n ^ 2)
		do ans :+ xy[i] * zwd[i]
	end for
	do cui@print("\{ans}\n")
end func
0