結果

問題 No.146 試験監督(1)
ユーザー testtest
提出日時 2020-09-16 08:22:09
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 1,841 ms
コンパイル使用メモリ 198,008 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-04 03:21:25
合計ジャッジ時間 2,526 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, ss, ee) for (int i = ss; i < ee; ++i)
using namespace std;
using ull = unsigned long long;
const ull MOD = 1e9 + 7;

void solve() {
  ull N, c, d, ans = 0;
  cin >> N;

  rep(i, 0, N) {
    cin >> c >> d;
    ans += (((c + 1) % MOD) / 2 % MOD) * d % MOD;
    ans %= MOD;
  }
  
  cout << ans << endl;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  getchar();
}
0