結果
問題 |
No.146 試験監督(1)
|
ユーザー |
|
提出日時 | 2019-01-24 20:51:58 |
言語 | Java (openjdk 23) |
結果 |
TLE
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 3,746 ms |
コンパイル使用メモリ | 75,788 KB |
実行使用メモリ | 69,644 KB |
最終ジャッジ日時 | 2024-09-16 04:42:38 |
合計ジャッジ時間 | 9,303 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 3 |
ソースコード
import java.util.Scanner; public class No146 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt(); long tot = 0 , mod = (long)Math.pow(10, 9) + 7l; for(int i = 0;i < n;i++){ long c = s.nextLong() , d = s.nextLong(); long c2 = ((c + 1) / 2) % mod, d2 = d % mod; tot += (c2 * d2) % mod; } s.close(); System.out.println(tot); } }