結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2015-06-17 11:41:49 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 261 bytes |
| コンパイル時間 | 208 ms |
| コンパイル使用メモリ | 20,480 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-07 03:29:14 |
| 合計ジャッジ時間 | 883 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d", &N);
| ^~~~~~~~~~~~~~~
main.c:9:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%lld%lld", &C, &D);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
int i, N;
long long int C, D, sum;
scanf("%d", &N);
sum = 0;
for(i = 1;i <= N;i++){
scanf("%lld%lld", &C, &D);
sum += (((C + 1) / 2) * D) % 1000000007;
sum %= 1000000007;
}
printf("%lld\n", sum);
return 0;
}
suppy193