提出 #23892159


ソースコード 拡げる

import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int x = Integer.parseInt(sc.next());
		int score = 0;
		int temp = 0;
		for (int i = 0; i < n; i++) {
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			temp = Math.max(temp, b);
			score += a * b;
		}
		score += temp * x;
		System.out.println(score);

	}
}

提出情報

提出日時
問題 B - Tensai
ユーザ tobi00604
言語 Java (OpenJDK 11.0.6)
得点 200
コード長 475 Byte
結果 AC
実行時間 121 ms
メモリ 35540 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 10
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
in01.txt AC 117 ms 35364 KiB
in02.txt AC 121 ms 35436 KiB
in03.txt AC 106 ms 35356 KiB
in04.txt AC 98 ms 35404 KiB
in05.txt AC 110 ms 35396 KiB
in06.txt AC 106 ms 35460 KiB
in07.txt AC 117 ms 35380 KiB
sample_01.txt AC 111 ms 35540 KiB
sample_02.txt AC 105 ms 35276 KiB
sample_03.txt AC 113 ms 35456 KiB