結果
問題 | No.1406 Test |
ユーザー |
![]() |
提出日時 | 2021-03-02 09:12:52 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 147 ms / 2,000 ms |
コード長 | 540 bytes |
コンパイル時間 | 3,548 ms |
コンパイル使用メモリ | 74,860 KB |
実行使用メモリ | 41,864 KB |
最終ジャッジ日時 | 2024-10-03 01:35:30 |
合計ジャッジ時間 | 7,832 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
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 = sc.nextInt();int sum = 0;int count = 0;for (int i = 0; i < number_total - 1; i ++) {sum += sc.nextInt();}for (int i = sum; i <= sum + 100; i ++) {if (i % number_total == 0) {count +=1;}}System.out.println(count);}}