結果
問題 | No.1593 Perfect Distance |
ユーザー |
|
提出日時 | 2021-08-29 20:10:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 276 bytes |
コンパイル時間 | 568 ms |
コンパイル使用メモリ | 63,744 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-11-22 08:05:35 |
合計ジャッジ時間 | 19,823 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 TLE * 6 |
ソースコード
#include <iostream> using namespace std; typedef long long LL; int main() { LL N,N2; cin >> N; N2 = N * N; LL nums = 0; for (int x = 1; x <= N; x++) { for (int y = 1; y <= N; y++) { if (x*x + y * y == N2) { nums++; } } } cout << nums << endl; return 0; }