結果

問題 No.146 試験監督(1)
ユーザー cureskol
提出日時 2020-04-07 19:09:46
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 117 ms / 1,000 ms
コード長 242 bytes
コンパイル時間 1,265 ms
コンパイル使用メモリ 166,060 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-07 21:45:45
合計ジャッジ時間 2,281 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

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

using ll=long long;
const int MOD=1e9+7;
ll ans;

signed main(){
  int n;cin>>n;
  while(n--){
    ll c,d;cin>>c>>d;
    c=(c+1)>>1;
    c%=MOD;d%=MOD;ans+=c*d;ans%=MOD;
  }
  cout<<ans<<endl;
}
0