結果

問題 No.1934 Four Fruits
コンテスト
ユーザー titan23
提出日時 2022-06-12 21:54:42
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 362 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 124 ms
コンパイル使用メモリ 85,080 KB
実行使用メモリ 54,716 KB
最終ジャッジ日時 2026-04-11 14:22:38
合計ジャッジ時間 1,194 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
input = lambda: sys.stdin.readline().rstrip()
from collections import Counter

##################

A = list(map(int, input().split()))
c = Counter(A)
if len(c) == 1:
  print(A[0])
elif len(c) == 2:
  if c[0] == 1:
    print(0)
  elif c[1] == 1:
    print(1)
  elif c[2] == 1:
    print(2)
  else:
    print(3)
else:
  print(list({0,1,2,3}-set(A))[0])
0