結果

問題 No.804 野菜が苦手
ユーザー akakimidori
提出日時 2019-03-22 21:24:01
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 365 bytes
コンパイル時間 211 ms
コンパイル使用メモリ 28,800 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-19 02:42:09
合計ジャッジ時間 935 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>

typedef int32_t i32;

void run (void) {
  i32 a, b, c, d;
  scanf ("%" SCNi32 "%" SCNi32 "%" SCNi32 "%" SCNi32, &a, &b, &c, &d);
  i32 ans = 0;
  while (ans <= a && c * ans <= b && ans + c * ans <= d) ans++;
  printf("%" PRIi32 "\n",ans - 1);
}

int main (void) {
  run ();
  return 0;
}
0