結果

問題 No.146 試験監督(1)
ユーザー mitsuomitsuo
提出日時 2016-05-04 23:08:36
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 596 bytes
コンパイル時間 2,502 ms
コンパイル使用メモリ 76,068 KB
実行使用メモリ 124,864 KB
最終ジャッジ日時 2024-04-15 11:35:04
合計ジャッジ時間 7,473 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import java.util.Scanner;

public class Main {
	static long t = 0;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			solve(sc.nextLine());
			System.gc();
		}
		System.out.println(t);

		sc.close();
	}

	public static void solve(String input) {
		if (input.split(" ").length == 1) {
			input = null;
			return;
		}
		long s = Long.valueOf(input.split(" ")[0]);
		long k = Long.valueOf(input.split(" ")[1]);
		input = null;
		
		if (s % 2 == 0) {
			t += (s / 2) * k;
		} else {
			t += (s + 1) / 2 * k;
		}
		t = t % 1000000007;
	}
}
0