結果

問題 No.1499 羊が、何匹だっけ
ユーザー マサマサ
提出日時 2022-01-11 16:12:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 451 bytes
コンパイル時間 3,762 ms
コンパイル使用メモリ 76,324 KB
実行使用メモリ 42,120 KB
最終ジャッジ日時 2024-04-26 20:41:05
合計ジャッジ時間 5,866 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
40,224 KB
testcase_01 AC 128 ms
40,120 KB
testcase_02 AC 140 ms
41,056 KB
testcase_03 AC 158 ms
42,120 KB
testcase_04 AC 157 ms
41,912 KB
testcase_05 AC 154 ms
41,924 KB
testcase_06 AC 146 ms
41,436 KB
testcase_07 AC 140 ms
41,456 KB
testcase_08 AC 148 ms
41,728 KB
testcase_09 AC 151 ms
41,696 KB
testcase_10 AC 145 ms
41,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Ex {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = sc.nextInt();
		String next = sc.nextLine();

		int[] ary = new int[count];
		for (int i = 0; i < count; i++) {
			String line = sc.nextLine();
			ary[i] = Integer.parseInt(line.substring(11, line.indexOf(" ", 11))) + 1;
		}

		for (int value : ary) {
			System.out.println("Hitsuji ga " + value + " hiki");
		}
	}
}
0