結果

問題 No.146 試験監督(1)
ユーザー aaaaaaiu
提出日時 2019-07-29 21:42:11
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 162 ms / 1,000 ms
コード長 295 bytes
コンパイル時間 2,411 ms
コンパイル使用メモリ 192,880 KB
最終ジャッジ日時 2025-01-07 10:00:14
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    int mod = 1e9+7;
    int n;
    cin >> n;
    ll ans = 0;
    while (n--) {
        ll c, d;
        cin >> c >> d;
        ans = (ans + (c+1)/2%mod*(d%mod))%mod;
    }
    cout << ans << endl;
    return 0;
}
0