結果
問題 | No.146 試験監督(1) |
ユーザー | KKT89 |
提出日時 | 2020-06-10 23:25:28 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 39 ms / 1,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 793 ms |
コンパイル使用メモリ | 94,740 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-06 00:24:39 |
合計ジャッジ時間 | 1,560 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 38 ms
4,380 KB |
testcase_01 | AC | 39 ms
4,376 KB |
testcase_02 | AC | 38 ms
4,380 KB |
ソースコード
#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; }