結果
| 問題 |
No.1593 Perfect Distance
|
| コンテスト | |
| ユーザー |
shiroha_F14
|
| 提出日時 | 2021-07-09 23:33:43 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 377 bytes |
| コンパイル時間 | 1,664 ms |
| コンパイル使用メモリ | 166,400 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-01 18:27:18 |
| 合計ジャッジ時間 | 2,313 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
#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 = pow(floor(sqrt(pow(n, 2) - pow(i, 2))), 2);
if(j && j == pow(n, 2) - pow(i, 2)) ans++;
}
cout << ans << endl;
}
shiroha_F14