結果

問題 No.146 試験監督(1)
ユーザー machy
提出日時 2015-06-11 08:48:33
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 133 ms / 1,000 ms
コード長 341 bytes
コンパイル時間 731 ms
コンパイル使用メモリ 57,924 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-06 15:33:24
合計ジャッジ時間 2,086 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;
typedef long long LL;

const LL MOD=1000000007;

int main(){
    LL N;
    cin >> N;
    LL ans = 0;
    for(int i = 0; i < N; i++){
        LL C, D;
        cin >> C >> D;
        ans += ((C+1)/2%MOD) * (D%MOD);
        ans %= MOD;
    }
    cout << ans << endl;
    return 0;
}
0