結果

問題 No.1229 ラグビーの得点パターン
ユーザー 遭難者遭難者
提出日時 2020-09-21 19:36:35
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 431 bytes
コンパイル時間 4,192 ms
コンパイル使用メモリ 71,328 KB
実行使用メモリ 56,324 KB
最終ジャッジ日時 2023-09-06 22:04:59
合計ジャッジ時間 7,898 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 107 ms
56,116 KB
testcase_02 AC 110 ms
55,500 KB
testcase_03 AC 114 ms
55,612 KB
testcase_04 AC 107 ms
55,696 KB
testcase_05 AC 108 ms
55,928 KB
testcase_06 AC 107 ms
55,732 KB
testcase_07 AC 108 ms
56,064 KB
testcase_08 AC 111 ms
55,480 KB
testcase_09 AC 107 ms
56,048 KB
testcase_10 AC 116 ms
55,692 KB
testcase_11 AC 113 ms
53,436 KB
testcase_12 AC 112 ms
55,888 KB
testcase_13 AC 112 ms
55,992 KB
testcase_14 AC 115 ms
55,992 KB
testcase_15 AC 116 ms
56,064 KB
testcase_16 AC 113 ms
55,692 KB
testcase_17 AC 116 ms
55,752 KB
testcase_18 AC 114 ms
55,740 KB
testcase_19 AC 114 ms
55,656 KB
testcase_20 AC 115 ms
55,952 KB
testcase_21 AC 113 ms
56,020 KB
testcase_22 AC 114 ms
55,880 KB
testcase_23 AC 114 ms
56,324 KB
testcase_24 AC 114 ms
55,692 KB
testcase_25 AC 112 ms
55,220 KB
testcase_26 AC 115 ms
56,092 KB
testcase_27 AC 116 ms
55,696 KB
testcase_28 AC 113 ms
55,660 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++;
		ou.println(yono);
		ou.flush();
	}
}
0