結果
| 問題 |
No.1593 Perfect Distance
|
| コンテスト | |
| ユーザー |
shiroha_F14
|
| 提出日時 | 2021-07-09 21:57:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 390 bytes |
| コンパイル時間 | 1,513 ms |
| コンパイル使用メモリ | 165,764 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-07-01 16:14:22 |
| 合計ジャッジ時間 | 6,669 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 11 TLE * 1 -- * 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