結果
| 問題 | 
                            No.804 野菜が苦手
                             | 
                    
| コンテスト | |
| ユーザー | 
                             はと
                         | 
                    
| 提出日時 | 2023-12-08 19:23:23 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 277 bytes | 
| コンパイル時間 | 703 ms | 
| コンパイル使用メモリ | 27,776 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-27 03:00:06 | 
| 合計ジャッジ時間 | 1,055 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 1 | 
| other | AC * 7 WA * 11 | 
ソースコード
#include <stdio.h>
int main(){
	int A,B,C,D,x,check;
	x = 0;
	scanf("%d %d %d %d",&A,&B,&C,&D);
	if(B<C){
		check = 1;
	}
	while(A > 0 && B > 0 && D > 0){
		A = A - 1;
		B = B - C;
		D = D - 1 - C;
		x++;
	}
	if(check == 1){
	    printf("0");
	}
	else{
		printf("%d",x);
	}
	
}
            
            
            
        
            
はと