結果
問題 |
No.1593 Perfect Distance
|
ユーザー |
![]() |
提出日時 | 2021-07-10 05:06:14 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 504 bytes |
コンパイル時間 | 802 ms |
コンパイル使用メモリ | 91,680 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 00:38:26 |
合計ジャッジ時間 | 1,615 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 8 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <functional> #include <queue> #include <map> #include <cmath> #include <iomanip> using namespace std; const long long MOD = (long long)(1e9) + 7; int main() { //cout << fixed << setprecision(15); long long n; cin >> n; int ans = 0; for (long long x = 1; x <= 1000; x++) { for (long long y = 1; y <= 1000; y++) { if (x * x + y * y == n * n) { ans++; } } } cout << ans << endl; return 0; }