結果

問題 No.1593 Perfect Distance
ユーザー Yug_min_null
提出日時 2021-09-05 07:25:09
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 1,692 ms
コンパイル使用メモリ 188,188 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-21 17:50:01
合計ジャッジ時間 2,561 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N; cin >> N;
  int ans = 0;
  for(int i = 1; i < N; i++){
    long long Y = sqrt(N*N-i*i);
    if(i*i+Y*Y == N*N) ans++;
  }
  cout << ans << endl;
}
0