結果

問題 No.146 試験監督(1)
ユーザー focusfocus
提出日時 2018-02-22 12:19:37
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 136 ms / 1,000 ms
コード長 392 bytes
コンパイル時間 613 ms
コンパイル使用メモリ 72,152 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-24 23:04:11
合計ジャッジ時間 1,899 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
    long long int N,sum=0,c,d,e;
    cin >> N;
    while(N--){
        cin >> c >> d;
        e = (c+1)/2;
        e = e % 1000000007;
        d = d % 1000000007;
        sum += e*d;
        sum = sum % 1000000007;
    }
    cout << sum;
    return 0;
}
0