結果

問題 No.1089 三変数方程式
ユーザー xRS43BofaUEZ5gc
提出日時 2021-03-19 13:29:53
言語 Java
(openjdk 23)
結果
TLE  
実行時間 -
コード長 386 bytes
コンパイル時間 3,437 ms
コンパイル使用メモリ 74,320 KB
実行使用メモリ 108,984 KB
最終ジャッジ日時 2024-11-18 08:05:17
合計ジャッジ時間 36,843 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 4 TLE * 11
権限があれば一括ダウンロードができます

ソースコード

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