結果

問題 No.146 試験監督(1)
ユーザー alcheminalchemin
提出日時 2019-09-25 12:53:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 360 bytes
コンパイル時間 4,390 ms
コンパイル使用メモリ 167,152 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-22 02:01:04
合計ジャッジ時間 2,911 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
    int n;
    int md = 1000000007;
    
    cin >> n;
    
    unsigned long long c, d, ans = 0;
    for (int i = 0; i < n; i++) {
        cin >> c >> d;
        ans += static_cast<long long>(ceil(c / 2.0) * d) % md;
    }
    
    cout << setprecision(20) << ans % md << endl;
    
    return 0;
}
0