結果

問題 No.146 試験監督(1)
ユーザー mitsuomitsuo
提出日時 2016-05-04 22:54:43
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 657 bytes
コンパイル時間 2,231 ms
コンパイル使用メモリ 75,240 KB
実行使用メモリ 72,848 KB
最終ジャッジ日時 2024-04-15 11:32:51
合計ジャッジ時間 5,649 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		List<String> input = new ArrayList<>();

		while (sc.hasNext()) {
			input.add(sc.nextLine());
		}

		System.out.println(solve(input));

		sc.close();
	}

	public static int solve(List<String> in) {
		int t = 0;
		for (int i = 1; i < in.size(); i++) {
			int s = 1;// Integer.valueOf(in.get(i).split(" ")[0]);
			int k = 2;// Integer.valueOf(in.get(i).split(" ")[1]);
			if (s % 2 == 0) {
				t += (s / 2) * k;
			} else {
				t += (s + 1) / 2 * k;
			}
		}
		return t;
	}
}
0