結果

問題 No.146 試験監督(1)
ユーザー tsunabittsunabit
提出日時 2019-05-12 14:14:31
言語 Java19
(openjdk 21)
結果
RE  
実行時間 -
コード長 575 bytes
コンパイル時間 3,200 ms
コンパイル使用メモリ 72,220 KB
実行使用メモリ 56,024 KB
最終ジャッジ日時 2023-09-17 05:24:59
合計ジャッジ時間 3,646 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

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

public class No146 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count = 0;
        for(int i = 0; i < n; i++) {
        	int c = sc.nextInt();
        	int d = sc.nextInt();
        	if(c % 2 == 0) {
        		count += c/2 * d;
        	}else {
        		count += (c/2 + 1) * d;
        	}
        }
        System.out.println(count);
    }
}
0