A - I Scream 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MB

配点 : 100100

問題文

日本において、アイス製品は次の 44 種類に大別されます。

  • 乳固形分1515 パーセント以上、乳脂肪分88 パーセント以上含まれるものを「アイスクリーム」とする。
  • 上に当てはまらず、乳固形分1010 パーセント以上、乳脂肪分33 パーセント以上含まれるものを「アイスミルク」とする。
  • 上のいずれにも当てはまらず、乳固形分33 パーセント以上含まれるものを「ラクトアイス」とする。
  • 上のいずれにも当てはまらないものを「氷菓」とする。

ここで、乳固形分無脂乳固形分乳脂肪分22 つから成ります。
AtCoder 名物の製品「スヌケアイス」には、無脂乳固形分AA パーセント、乳脂肪分BB パーセント含まれています。
スヌケアイスに上の分類を適用したとすると、44 種類のどれに当てはまるでしょうか ?
答えは「出力」の項に従って整数で出力してください。

制約

  • 0A1000 \le A \le 100
  • 0B1000 \le B \le 100
  • A+B100A + B \le 100
  • A,BA, B は整数

入力

入力は以下の形式で標準入力から与えられる。

AA BB

出力

以下に定められる整数を出力せよ :

  • スヌケアイスがアイスクリームに当てはまる場合 : 11
  • スヌケアイスがアイスミルクに当てはまる場合 : 22
  • スヌケアイスがラクトアイスに当てはまる場合 : 33
  • スヌケアイスが氷菓に当てはまる場合 : 44

入力例 1 Copy

Copy
10 8

出力例 1 Copy

Copy
1

このスヌケアイスには、無脂乳固形分が 1010 パーセント、乳脂肪分が 88 パーセント含まれているため、乳固形分は 1818 パーセント含まれています。
乳固形分が 1515 パーセント以上、乳脂肪分が 88 パーセント以上含まれているため、アイスクリームに分類されます。従って 11 が正しい出力です。


入力例 2 Copy

Copy
1 2

出力例 2 Copy

Copy
3

乳固形分がちょうど 33 パーセント含まれているため、アイスクリームやアイスミルクには該当しませんが、ラクトアイスに該当するため 33 を出力します。


入力例 3 Copy

Copy
0 0

出力例 3 Copy

Copy
4

氷菓に分類されます。

Score : 100100 points

Problem Statement

In Japan, there are four major categories of ice cream type products:

  • an ice cream type product with at least 1515 percent milk solids and at least 88 percent milk fat is called an ice cream;
  • an ice cream type product with at least 1010 percent milk solids and at least 33 percent milk fat that is not an ice cream is called an ice milk;
  • an ice cream type product with at least 33 percent milk solids that is not an ice cream or an ice milk is called a lacto ice;
  • an ice cream type product that is not an ice cream, an ice milk, or a lacto ice is called a flavored ice.

Here, milk solids consist of milk fat and milk solids-not-fat.
AtCoder's famous product Snuke Ice contains AA percent milk solids-not-fat and BB percent milk fat.
Which of the categories above does Snuke Ice fall into?
Print your answer as an integer according to the Output section.

Constraints

  • 0A1000 \le A \le 100
  • 0B1000 \le B \le 100
  • A+B100A + B \le 100
  • AA and BB are integers.

Input

Input is given from Standard Input in the following format:

AA BB

Output

Print an integer as follows:

  • if Snuke Ice is an ice cream, print 11;
  • if Snuke Ice is an ice milk, print 22;
  • if Snuke Ice is a lacto ice, print 33;
  • if Snuke Ice is a flavored ice, print 44.

Sample Input 1 Copy

Copy
10 8

Sample Output 1 Copy

Copy
1

This product contains 1010 percent milk solids-not-fat and 88 percent milk fat, for a total of 1818 percent milk solids.
Since it contains not less than 1515 percent milk solids and not less than 88 percent milk fat, it is an ice cream; the correct output is 11.


Sample Input 2 Copy

Copy
1 2

Sample Output 2 Copy

Copy
3

Since it contains exactly 33 percent milk solids, it is not an ice cream or an ice milk but is a lacto ice; the correct output is 33.


Sample Input 3 Copy

Copy
0 0

Sample Output 3 Copy

Copy
4

It is a flavored ice.



2023-07-10 (月)
11:04:17 +00:00