結果

問題 No.1406 Test
ユーザー xRS43BofaUEZ5gcxRS43BofaUEZ5gc
提出日時 2021-03-02 09:02:34
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 694 bytes
コンパイル時間 3,694 ms
コンパイル使用メモリ 76,696 KB
実行使用メモリ 56,764 KB
最終ジャッジ日時 2023-07-26 14:27:02
合計ジャッジ時間 7,174 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,716 KB
testcase_01 AC 116 ms
56,168 KB
testcase_02 AC 119 ms
56,028 KB
testcase_03 WA -
testcase_04 AC 121 ms
56,036 KB
testcase_05 AC 119 ms
56,344 KB
testcase_06 AC 117 ms
56,316 KB
testcase_07 RE -
testcase_08 AC 114 ms
56,348 KB
testcase_09 RE -
testcase_10 AC 110 ms
56,216 KB
testcase_11 AC 115 ms
55,892 KB
testcase_12 AC 116 ms
55,936 KB
testcase_13 AC 121 ms
56,236 KB
testcase_14 WA -
testcase_15 AC 115 ms
56,132 KB
testcase_16 AC 123 ms
53,772 KB
testcase_17 RE -
testcase_18 AC 128 ms
55,824 KB
testcase_19 AC 121 ms
55,896 KB
testcase_20 RE -
testcase_21 AC 112 ms
55,992 KB
testcase_22 AC 108 ms
55,984 KB
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;

public class HelloWorld {

	    public static void main(String[] args) {

	        Scanner sc = new Scanner(System.in);
	        int number_total = Integer.parseInt(sc.nextLine());
	        String[] line  = sc.nextLine().split(" ");
	        int[] array = Arrays.stream(line).mapToInt(Integer::parseInt).toArray();
	        int sum = 0;
	        int count = 0;

	        for (int i = 0; i < number_total - 1; i ++) {
	        	sum += array[i];
	        }

	        for (int i = sum + 1; i <= sum + 100; i ++) {
	        	if (i % number_total == 0) {
	        		count +=1;

	        	}
	        }

	        System.out.println(count);
	    }
	}
0