結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-03-07 13:35:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 252 bytes |
| コンパイル時間 | 372 ms |
| コンパイル使用メモリ | 27,264 KB |
| 実行使用メモリ | 8,604 KB |
| 最終ジャッジ日時 | 2025-03-07 13:35:19 |
| 合計ジャッジ時間 | 1,424 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%lld",&type);
| ~~~~~^~~~~~~~~~~~~~
main.cpp:10:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%lld%lld",&chair,&table);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
long long type = 0;
scanf("%lld",&type);
long long ans = 0;
for(long long i = 0;i < type;i++){
long long chair,table;
scanf("%lld%lld",&chair,&table);
ans += (chair / 2) * table;
}
printf("%lld",ans);
}
sasa