結果
問題 | No.146 試験監督(1) |
ユーザー |
|
提出日時 | 2020-06-10 23:23:14 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 374 bytes |
コンパイル時間 | 1,058 ms |
コンパイル使用メモリ | 94,176 KB |
最終ジャッジ日時 | 2025-01-11 00:57:35 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 3 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> #include <math.h> using namespace std; typedef long long int ll; constexpr ll mod=1e9+7; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int q; cin >> q; ll res=0; while(q--){ ll a,b; cin >> a >> b; a=(a+1)/2; (res+=a%mod*b%mod)%=mod; } cout << res << endl; }