結果
問題 | No.1218 Something Like a Theorem |
ユーザー |
![]() |
提出日時 | 2022-11-18 09:26:44 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 271 bytes |
コンパイル時間 | 230 ms |
コンパイル使用メモリ | 82,008 KB |
実行使用メモリ | 76,092 KB |
最終ジャッジ日時 | 2024-09-19 17:56:01 |
合計ジャッジ時間 | 8,416 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 13 TLE * 3 |
ソースコード
n,z=map(int,input().split()) c=z**n if n==1: if z==1: print("NO") else: print("YES") else: for i in range(1,1001): for j in range(1,1001): if i**n+j**n==c: print("YES") exit() print("NO")