結果
問題 |
No.1218 Something Like a Theorem
|
ユーザー |
![]() |
提出日時 | 2020-07-16 04:24:02 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 285 bytes |
コンパイル時間 | 510 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-17 15:54:16 |
合計ジャッジ時間 | 6,207 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 16 |
ソースコード
n, z = map(int, input().split()) if n == 1: if z == 1: print(-1) else: print(1, z-1) else: ok = False for x in range(1, 1001): for y in range(x, 1001): if pow(x, n) + pow(y, n) == pow(z, n): print(x, y) ok = True break if ok: break if not ok: print(-1)