結果

問題 No.1229 ラグビーの得点パターン
ユーザー 遭難者遭難者
提出日時 2020-09-21 19:37:29
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 454 bytes
コンパイル時間 4,873 ms
コンパイル使用メモリ 71,832 KB
実行使用メモリ 56,532 KB
最終ジャッジ日時 2023-09-06 22:08:47
合計ジャッジ時間 9,614 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
55,908 KB
testcase_01 AC 114 ms
55,576 KB
testcase_02 AC 115 ms
56,436 KB
testcase_03 AC 122 ms
55,756 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 112 ms
55,812 KB
testcase_07 WA -
testcase_08 AC 117 ms
56,296 KB
testcase_09 AC 117 ms
55,568 KB
testcase_10 AC 118 ms
56,500 KB
testcase_11 AC 113 ms
55,476 KB
testcase_12 AC 113 ms
55,856 KB
testcase_13 AC 116 ms
55,940 KB
testcase_14 AC 121 ms
55,992 KB
testcase_15 AC 123 ms
56,396 KB
testcase_16 AC 119 ms
56,004 KB
testcase_17 AC 121 ms
55,708 KB
testcase_18 AC 124 ms
55,948 KB
testcase_19 AC 120 ms
56,112 KB
testcase_20 AC 119 ms
55,860 KB
testcase_21 AC 120 ms
55,664 KB
testcase_22 AC 124 ms
55,860 KB
testcase_23 AC 123 ms
55,448 KB
testcase_24 AC 121 ms
55,852 KB
testcase_25 AC 121 ms
55,328 KB
testcase_26 AC 122 ms
55,824 KB
testcase_27 AC 120 ms
55,504 KB
testcase_28 AC 118 ms
55,544 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(yono == 0)yono++;
		ou.println(yono);
		ou.flush();
	}
}
0