結果
| 問題 | No.1593 Perfect Distance |
| コンテスト | |
| ユーザー |
shiroha_F14
|
| 提出日時 | 2021-07-09 21:57:27 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 390 bytes |
| 記録 | |
| コンパイル時間 | 945 ms |
| コンパイル使用メモリ | 179,396 KB |
| 実行使用メモリ | 12,800 KB |
| 最終ジャッジ日時 | 2026-03-22 18:23:33 |
| 合計ジャッジ時間 | 18,218 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 TLE * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define fs(n) fixed << setprecision(n);
#define mp(a, b) make_pair(a, b);
using ll = long long;
using ld = long double;
int main(){
ll n; cin >> n;
int ans = 0;
for(ll i = 1; i < 200000; i++){
ll j = n * n - i * i;
for(ll x = 1; x <= sqrt(j); x++){
if(x * x == j){
ans++;
}
}
}
cout << ans << endl;
}
shiroha_F14