結果
問題 |
No.146 試験監督(1)
|
ユーザー |
![]() |
提出日時 | 2019-12-16 19:21:42 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 299 bytes |
コンパイル時間 | 1,091 ms |
コンパイル使用メモリ | 29,184 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 20:24:08 |
合計ジャッジ時間 | 1,126 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 3 |
ソースコード
#include <stdio.h> int main() { int n, i; scanf("%d", &n); long long sum=0, c, d; for (i=0; i<n; i++) { scanf("%lld %lld", &c, &d); if (c%2==0) { sum+=(c/2*d)%(1000000000+7); } else { sum+=((c+1)/2*d)%(1000000000+7); } } printf("%lld", sum); return 0; }