結果

問題 No.2358 xy+yz+zx=N
ユーザー ああいいああいい
提出日時 2023-07-01 19:47:55
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 428 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 86,908 KB
最終ジャッジ日時 2023-09-22 13:57:15
合計ジャッジ時間 4,936 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
75,872 KB
testcase_01 AC 75 ms
71,156 KB
testcase_02 AC 79 ms
71,496 KB
testcase_03 AC 75 ms
71,312 KB
testcase_04 AC 76 ms
71,288 KB
testcase_05 AC 76 ms
71,436 KB
testcase_06 AC 88 ms
76,360 KB
testcase_07 AC 116 ms
76,900 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

ans = []
num = 0
for x in range(N + 1):
    for y in range(N + 1):
        t = x * y
        if t > N:break
        if x + y == 0:
            if t == N:
                num += 1
                ans.append((x,y,0))
                
        else:
            if (N - t) % (x +  y) == 0:
                num += 1
                ans.append((x,y,(N - t) // (x + y)))
print(num)
for x,y,z in ans:
    print(x,y,z)
0