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