結果
問題 |
No.804 野菜が苦手
|
ユーザー |
|
提出日時 | 2020-02-05 01:14:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 185 bytes |
コンパイル時間 | 185 ms |
コンパイル使用メモリ | 23,296 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-21 07:53:23 |
合計ジャッジ時間 | 949 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }