結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-21 09:02:42 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 227 bytes |
| コンパイル時間 | 372 ms |
| コンパイル使用メモリ | 20,864 KB |
| 実行使用メモリ | 6,940 KB |
| 最終ジャッジ日時 | 2024-07-17 13:53:27 |
| 合計ジャッジ時間 | 1,238 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d", &t);
| ^~~~~~~~~~~~~~~
main.c:10:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%d %d", &s, &n);
| ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <stdlib.h>
int main() {
int t, s, n, i, a = 0;
scanf("%d", &t);
for (i = 0; i < t; i++) {
scanf("%d %d", &s, &n);
a += (s / 2 + s % 2) * n;
}
printf("%d\n", a);
return EXIT_SUCCESS;
}