結果

問題 No.1089 三変数方程式
ユーザー Shawn stayCShawn stayC
提出日時 2020-06-26 22:24:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 231 bytes
コンパイル時間 1,461 ms
コンパイル使用メモリ 163,636 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-09-18 05:44:31
合計ジャッジ時間 4,967 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,640 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 43 ms
4,380 KB
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)

int main(){
	int n; cin>>n;
	int ans=0;
	rep(i,n+1){
		rep(j,n+1){
			rep(k,n+1){
				if(i+j+k==n) ans++;
			}
		}
	}
	cout << ans << endl;
}
0