結果
| 問題 | 
                            No.1089 三変数方程式
                             | 
                    
| ユーザー | 
                             🍮かんプリン
                         | 
                    
| 提出日時 | 2020-06-25 23:54:11 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 7 ms / 2,000 ms | 
| コード長 | 408 bytes | 
| コンパイル時間 | 1,949 ms | 
| コンパイル使用メモリ | 157,560 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-03 21:58:52 | 
| 合計ジャッジ時間 | 2,907 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 15 | 
ソースコード
/**
 *   @FileName	a.cpp
 *   @Author	kanpurin
 *   @Created	2020.06.25 23:54:05
**/
#include "bits/stdc++.h" 
using namespace std; 
typedef long long ll;
int main() {
    int n;cin >> n;
    int cnt = 0;
    for (int x = 0; x <= n; x++) {
        for (int y = 0; y <= n; y++) {
            if (0 <= n - x - y) {
                cnt++;
            }
        }
    }
    cout << cnt << endl;
    return 0;
}
            
            
            
        
            
🍮かんプリン