結果
問題 |
No.1593 Perfect Distance
|
ユーザー |
|
提出日時 | 2021-07-09 21:24:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 485 bytes |
コンパイル時間 | 1,472 ms |
コンパイル使用メモリ | 165,516 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-01 15:02:16 |
合計ジャッジ時間 | 2,203 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 8 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #ifdef LOCAL #include "debug.hpp" #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__) #else #define debug(...) #endif int main() { ios::sync_with_stdio(false); cin.tie(0); ll N; cin >> N; ll ans = 0; for (ll i = 1; i < 1000; i++) { for (ll j = 1; j < 1000; j++) { ll temp = i * i + j * j; if (temp == N * N) ans++; } } cout << ans << '\n'; return 0; }