結果
問題 | No.146 試験監督(1) |
ユーザー |
![]() |
提出日時 | 2024-07-24 00:43:41 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 134 ms / 1,000 ms |
コード長 | 505 bytes |
コンパイル時間 | 2,936 ms |
コンパイル使用メモリ | 245,532 KB |
実行使用メモリ | 6,940 KB |
最終ジャッジ日時 | 2024-07-24 00:43:46 |
合計ジャッジ時間 | 4,461 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; #include <atcoder/modint> using mint = atcoder::modint1000000007; int main() { int n; cin >> n; mint ans = 0; rep(_, n) { ll c, d; cin >> c >> d; ans += mint((c + 1) / 2) * d; } cout << ans.val() << endl; return 0; }