結果
問題 | No.1593 Perfect Distance |
ユーザー |
![]() |
提出日時 | 2021-07-09 21:25:18 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 81 ms / 2,000 ms |
コード長 | 147 bytes |
コンパイル時間 | 213 ms |
コンパイル使用メモリ | 82,788 KB |
実行使用メモリ | 91,392 KB |
最終ジャッジ日時 | 2024-07-01 15:03:34 |
合計ジャッジ時間 | 1,853 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
n=int(input()) h=set() i=1 while i<=n: h.add(i**2) i+=1 ans=0 x=1 while x<=n: y2=n**2-x**2 if y2 in h:ans+=1 x+=1 print(ans)