結果
問題 |
No.146 試験監督(1)
|
ユーザー |
![]() |
提出日時 | 2018-02-17 00:49:54 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 553 bytes |
コンパイル時間 | 3,398 ms |
コンパイル使用メモリ | 74,556 KB |
実行使用メモリ | 71,636 KB |
最終ジャッジ日時 | 2024-06-23 17:08:21 |
合計ジャッジ時間 | 7,572 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 3 |
ソースコード
import java.util.Scanner; public class No146 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); long C[] = new long[N]; long D[] = new long[N]; for(int i = 0;i < N;i++) { C[i] = sc.nextLong(); D[i] = sc.nextLong(); } long sum = 0; for(int i = 0;i < N;i++) { if(C[i]%2 == 0) { sum += (C[i]/2 % 1000000007) * (D[i] % 1000000007) % 1000000007; }else { sum += ((C[i]/2 + 1) % 1000000007) * (D[i] % 1000000007) % 1000000007; } } System.out.println(sum); } }