結果
問題 |
No.804 野菜が苦手
|
ユーザー |
![]() |
提出日時 | 2019-06-03 18:06:29 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 263 bytes |
コンパイル時間 | 352 ms |
コンパイル使用メモリ | 29,184 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-17 20:33:36 |
合計ジャッジ時間 | 929 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 10 WA * 8 |
ソースコード
#include<stdio.h> #include<math.h> int main(){ int a,b,c,d; int ans=0; scanf("%d%d%d%d",&a,&b,&c,&d); if(c>b){ printf("%d",0); return 0; } while(d>0&&a>0&&b>0){ a-=1; b-=c; d-=c+1; ans++; } printf("%d",ans); return 0; }