結果
問題 |
No.1593 Perfect Distance
|
ユーザー |
![]() |
提出日時 | 2021-07-09 21:26:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 351 bytes |
コンパイル時間 | 1,471 ms |
コンパイル使用メモリ | 165,648 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-01 15:08:12 |
合計ジャッジ時間 | 2,205 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 WA * 9 |
ソースコード
#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 < 500; i++){ for(ll j = 1; j < 500; j++){ if(n * n == i * i + j * j) ans++; } } cout << ans << endl; }