結果

問題 No.2358 xy+yz+zx=N
ユーザー とりゐとりゐ
提出日時 2023-07-03 23:35:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 348 ms
コンパイル使用メモリ 87,120 KB
実行使用メモリ 80,548 KB
最終ジャッジ日時 2023-09-24 21:05:31
合計ジャッジ時間 3,540 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,472 KB
testcase_01 AC 72 ms
71,912 KB
testcase_02 AC 71 ms
71,692 KB
testcase_03 AC 72 ms
71,196 KB
testcase_04 AC 70 ms
71,892 KB
testcase_05 AC 69 ms
71,640 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

n=int(input())
ans=set()
for x in range(0,int(n**0.34)+2):
  for y in range(1,int(n**0.5)+2):
    if (n-x*y)%(x+y)==0:
      z=(n-x*y)//(x+y)
      if z>=0:
        for p in itertools.permutations([x,y,z]):
          ans.add(p)

print(len(ans))
for i in ans:
  print(*i)
0