結果
| 問題 |
No.1593 Perfect Distance
|
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2021-07-10 05:08:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 506 bytes |
| コンパイル時間 | 950 ms |
| コンパイル使用メモリ | 91,680 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-02 00:40:15 |
| 合計ジャッジ時間 | 1,938 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 5 WA * 12 |
ソースコード
#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 * x <= n; x++) {
for (long long y = 1; y * y <= n; y++) {
if (x * x + y * y == n * n) {
ans++;
}
}
}
cout << ans << endl;
return 0;
}
mmn15277198