結果
問題 | No.146 試験監督(1) |
ユーザー |
![]() |
提出日時 | 2025-03-07 13:32:42 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 252 bytes |
コンパイル時間 | 544 ms |
コンパイル使用メモリ | 27,264 KB |
実行使用メモリ | 8,480 KB |
最終ジャッジ日時 | 2025-03-07 13:32:44 |
合計ジャッジ時間 | 1,230 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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); }