結果
問題 |
No.146 試験監督(1)
|
ユーザー |
![]() |
提出日時 | 2018-05-26 19:25:40 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 269 bytes |
コンパイル時間 | 139 ms |
コンパイル使用メモリ | 29,440 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 18:16:19 |
合計ジャッジ時間 | 832 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 3 |
ソースコード
#include<stdio.h> int main(void){ int n, i; long c, d, total = 0; scanf("%d", &n); for(i = 0 ; i < n ; i++){ scanf("%ld %ld", &c, &d); if(c%2 == 0){ total += c / 2 * d; }else{ total += ((c-1)/2 + 1) * d; } } printf("%ld\n", total); return 0; }