結果

問題 No.2850 Make Slimes
ユーザー tnakao0123
提出日時 2024-08-29 13:34:22
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 433 ms
コンパイル使用メモリ 39,932 KB
最終ジャッジ日時 2025-02-24 02:41:08
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:17:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   17 |   scanf("%d%d%d%d", &a, &b, &c, &d);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 2850.cc:  No.2850 Make Slimes - yukicoder
 */

#include<cstdio>
#include<algorithm>

using namespace std;

const int INF = 1 << 30;

/* main */

int main() {
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);

  int e = (a > 0) ? c / a : INF;
  int f = (b > 0) ? d / b : INF;
  printf("%d\n", min(e, f));
  
  return 0;
}
0