結果
| 問題 | No.1593 Perfect Distance |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-29 20:10:06 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 276 bytes |
| 記録 | |
| コンパイル時間 | 457 ms |
| コンパイル使用メモリ | 75,756 KB |
| 実行使用メモリ | 9,728 KB |
| 最終ジャッジ日時 | 2026-05-16 10:47:48 |
| 合計ジャッジ時間 | 6,035 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 12 TLE * 1 -- * 4 |
ソースコード
#include <iostream>
using namespace std;
typedef long long LL;
int main()
{
LL N,N2;
cin >> N;
N2 = N * N;
LL nums = 0;
for (int x = 1; x <= N; x++) {
for (int y = 1; y <= N; y++) {
if (x*x + y * y == N2) {
nums++;
}
}
}
cout << nums << endl;
return 0;
}