結果
問題 |
No.804 野菜が苦手
|
ユーザー |
|
提出日時 | 2020-02-05 01:16:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 187 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 22,912 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-21 07:54:43 |
合計ジャッジ時間 | 878 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 WA * 2 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:4:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%d %d %d %d",&A,&B,&C,&D); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio> int main(){ int A,B,C,D,ans=0; scanf("%d %d %d %d",&A,&B,&C,&D); while((A--)>=0 && (B-=C)>=0 && (D-=(1+C))>=0)ans++; printf("%d\n",ans); return 0; }