結果
問題 |
No.146 試験監督(1)
|
ユーザー |
![]() |
提出日時 | 2016-03-05 01:50:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 452 ms |
コンパイル使用メモリ | 59,452 KB |
実行使用メモリ | 6,940 KB |
最終ジャッジ日時 | 2024-09-24 14:13:04 |
合計ジャッジ時間 | 1,571 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 3 |
ソースコード
#include<iostream> #include<cmath> using namespace std; #define MOD ((int)pow(10.0,9)+7) int main(){ long long N,C,D,ans=0; cin>>N; for(int i=0;i<N;i++){ cin>>C>>D; long long tmp=(C-1)/2+1; tmp%=MOD; D%=MOD; ans+=(tmp*D)%MOD; } cout<<ans<<endl; }