問題一覧 > 通常問題

No.1934 Four Fruits

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 303
作問者 : noya2 / テスター : kotatsugame tatyam
お気に入りにしたユーザー ProblemId : 7327 / 自分の提出
問題文最終更新日: 2022-05-11 00:23:09
Four Fruits
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Show the original
yukicoder contest 343 (順位表) の他の問題:

Problem Statement

Noya came to a shop that sells plenty of each of $4$ types of fruit $0,1,2,3$, and bought $4$ fruits so as to satisfy at least one of the following conditions.

  • The $4$ fruits are all of the same type.
  • The $4$ fruits consist of $2$ fruits each of $2$ types.
  • The types of the $4$ fruits are all different.

  • Given that $3$ of the $4$ fruits Noya bought are $a,b,c$, find the remaining $1$ fruit.

    It can be shown that the answer is uniquely determined for any input under these constraints.

    Constraints

  • All inputs are integers.
  • $0\le a,b,c\le 3$
  • Input

    $a\ b\ c$
    

    Output

    Determine which of $0,1,2,3$ the remaining $1$ fruit is, and print it.

    Sample

    Sample 1
    Input
    1 1 1
    Output
    1

    Noya bought the fruits so as to satisfy the $1$st condition.

    Sample 2
    Input
    3 2 3
    Output
    2

    Noya bought the fruits so as to satisfy the $2$nd condition.

    Sample 3
    Input
    1 3 2
    Output
    0

    Noya bought the fruits so as to satisfy the $3$rd condition.

    提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。