結果

問題 No.146 試験監督(1)
ユーザー michonz4michonz4
提出日時 2019-12-16 19:21:42
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 299 bytes
コンパイル時間 1,169 ms
コンパイル使用メモリ 28,156 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-15 18:23:12
合計ジャッジ時間 1,477 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#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;
}
0