結果
| 問題 |
No.1089 三変数方程式
|
| ユーザー |
kyo1
|
| 提出日時 | 2020-07-14 05:22:11 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 337 bytes |
| コンパイル時間 | 2,859 ms |
| コンパイル使用メモリ | 191,132 KB |
| 最終ジャッジ日時 | 2025-01-11 20:27:57 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N;
cin >> N;
int res = 0;
for (int x = 0; x < N + 1; x++) {
for (int y = 0; y < N + 1; y++) {
int z = N - x - y;
if (z < 0 || z > N) continue;
res++;
}
}
cout << res << '\n';
return 0;
}
kyo1