結果

問題 No.1934 Four Fruits
コンテスト
ユーザー Theta
提出日時 2022-10-28 18:16:42
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 356 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 415 ms
コンパイル使用メモリ 20,952 KB
実行使用メモリ 20,772 KB
最終ジャッジ日時 2026-03-27 07:28:16
合計ジャッジ時間 2,455 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 5 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from collections import Counter


def main():
    fruits = Counter(map(int, input().split()))
    match len(fruits):
        case 1:
            print(fruits.keys()[0])
        case 3:
            print(6 - sum(fruits.keys()))
        case 2:
            print(list(filter(lambda elm: fruits[elm] == 1, fruits))[0])


if __name__ == "__main__":
    main()
0