結果

問題 No.1089 三変数方程式
ユーザー xRS43BofaUEZ5gcxRS43BofaUEZ5gc
提出日時 2021-03-19 13:29:53
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 386 bytes
コンパイル時間 3,514 ms
コンパイル使用メモリ 74,176 KB
実行使用メモリ 46,956 KB
最終ジャッジ日時 2024-04-29 06:47:25
合計ジャッジ時間 7,721 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
46,412 KB
testcase_01 AC 134 ms
41,292 KB
testcase_02 AC 193 ms
39,908 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 #

import java.util.Scanner;


public class HelloWorld {
		public static void main (String[] args) {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			sc.close();

			int count =0;
			for (int x=0;x<=n;x++) {
				for (int y=0;y<=n;y++) {
					for(int z=0;z<=n;z++) {
						if (x+y+z == n) {
							 count ++;
						}
					}
				}
			}
			System.out.println(count);


	}
}
0