結果

問題 No.2358 xy+yz+zx=N
ユーザー komkompikomkompi
提出日時 2023-07-15 06:20:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 80,240 KB
最終ジャッジ日時 2023-10-14 20:56:00
合計ジャッジ時間 15,746 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 802 ms
77,032 KB
testcase_01 AC 801 ms
77,196 KB
testcase_02 AC 803 ms
76,948 KB
testcase_03 AC 802 ms
77,032 KB
testcase_04 AC 806 ms
76,932 KB
testcase_05 AC 801 ms
77,052 KB
testcase_06 AC 836 ms
77,096 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
N=int(input())

#xy+yz+zx=(N-x**2-y**2-z**2)/2
ITER=3400

ans=[]
for x in range(ITER):
    for y in range(ITER):
        if x+y==0:
            continue

        z=(N-x*y)/(x+y)
        if z==z//1 and z>=0:
            ans.append([x,y,int(z//1)])

print(len(ans))

for item in ans:
    print(*item)
0