結果
問題 |
No.146 試験監督(1)
|
ユーザー |
![]() |
提出日時 | 2018-09-12 16:47:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 359 bytes |
コンパイル時間 | 1,525 ms |
コンパイル使用メモリ | 166,172 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 04:04:31 |
合計ジャッジ時間 | 2,756 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 3 |
ソースコード
#include <bits/stdc++.h> typedef long long ll; #define INF 1000000000 #define MOD 1000000007 using namespace std; int main(void){ int n; cin>>n; ll ans=0; for(int i=0;i<n;i++){ ll c,d; cin>>c>>d; if(c==1){ ans+=d%MOD; }else{ ans+=((c-1)%MOD)*d%MOD; } } cout<<ans<<endl; }