結果

問題 No.804 野菜が苦手
コンテスト
ユーザー yuyu_106
提出日時 2019-05-26 02:24:26
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 241 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 511 ms
コンパイル使用メモリ 26,188 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-12-06 14:50:13
合計ジャッジ時間 1,004 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |     scanf("%d%d%d%d",&a,&b,&c,&d);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #
raw source code

#include <stdio.h>

int main(void){
    int a,b,c,d;
    int xxx;
    int ans;
    scanf("%d%d%d%d",&a,&b,&c,&d);
    xxx = b/c;
    if(xxx>a){
        xxx=a;
    }
    while(xxx*(c+1) > d){
            xxx--;
    }
    printf("%d",xxx);
}

0