結果

問題 No.146 試験監督(1)
ユーザー face4face4
提出日時 2018-04-24 19:26:26
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 318 bytes
コンパイル時間 449 ms
コンパイル使用メモリ 63,712 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-09 23:37:41
合計ジャッジ時間 1,667 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
using namespace std;
typedef long long ll;

#define NUM 1000000007

int main(){
    int n;
    ll c1, d1, ans = 0;
    cin >> n;
    while(n-- > 0){
        cin >> c1 >> d1;
        ll people = ((c1+1)/2)%NUM;
        ans += ((d1%NUM) * people) % NUM;
    }

    cout << ans << endl;
    return 0;
}
0