結果

問題 No.1229 ラグビーの得点パターン
ユーザー 遭難者遭難者
提出日時 2020-09-21 19:38:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 451 bytes
コンパイル時間 2,043 ms
コンパイル使用メモリ 72,712 KB
実行使用メモリ 57,928 KB
最終ジャッジ日時 2023-09-06 22:12:40
合計ジャッジ時間 6,753 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,520 KB
testcase_01 AC 115 ms
55,552 KB
testcase_02 AC 114 ms
55,760 KB
testcase_03 AC 124 ms
55,608 KB
testcase_04 AC 116 ms
53,572 KB
testcase_05 AC 114 ms
55,980 KB
testcase_06 AC 117 ms
55,912 KB
testcase_07 AC 115 ms
56,004 KB
testcase_08 AC 113 ms
55,664 KB
testcase_09 AC 112 ms
55,760 KB
testcase_10 AC 118 ms
55,624 KB
testcase_11 AC 115 ms
55,832 KB
testcase_12 AC 115 ms
55,392 KB
testcase_13 AC 119 ms
57,928 KB
testcase_14 AC 121 ms
55,544 KB
testcase_15 AC 126 ms
56,028 KB
testcase_16 AC 122 ms
55,804 KB
testcase_17 AC 125 ms
55,668 KB
testcase_18 AC 125 ms
55,868 KB
testcase_19 AC 123 ms
55,824 KB
testcase_20 AC 123 ms
55,956 KB
testcase_21 AC 127 ms
55,908 KB
testcase_22 AC 124 ms
56,120 KB
testcase_23 AC 123 ms
55,860 KB
testcase_24 AC 123 ms
56,284 KB
testcase_25 AC 122 ms
55,628 KB
testcase_26 AC 122 ms
55,548 KB
testcase_27 AC 127 ms
56,088 KB
testcase_28 AC 123 ms
55,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
public class Main {
    public static void main(String[]args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		int n = Integer.parseInt(sc.next());
		sc.close();
		long yono = 0;
		for(int i = 0 ; i < n ; i++)for(int j = 0 ; j < n ; j++)for(int k = 0 ; k < n ; k++)if(5 * i + 2 * j + 3 * k == n && i >= j) yono++;
		if(n == 0)yono++;
		ou.println(yono);
		ou.flush();
	}
}
0