結果

問題 No.146 試験監督(1)
ユーザー ninoinui
提出日時 2020-01-23 20:58:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 134 ms / 1,000 ms
コード長 239 bytes
コンパイル時間 1,482 ms
コンパイル使用メモリ 166,544 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-20 05:25:23
合計ジャッジ時間 2,596 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N, M = 1e9+7;
  cin >> N;
  long long ans = 0, c, d;
  for (int i = 0; i < N && cin >> c >> d; i++)
    ans = (ans + d % M * ((c + 1) / 2 % M)) % M;
  cout << ans << "\n";
}
0