結果
問題 |
No.1089 三変数方程式
|
ユーザー |
|
提出日時 | 2020-12-21 19:19:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 263 bytes |
コンパイル時間 | 1,702 ms |
コンパイル使用メモリ | 166,936 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-21 13:04:04 |
合計ジャッジ時間 | 2,322 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int64_t n; cin >> n; int64_t ans = 0; for (int64_t i = 0; i <= n; i++) { for (int64_t j = 0; i + j <= n; j++) { if (n - i - j >= 0) ans++; } } cout << ans << '\n'; return 0; }