結果

問題 No.1934 Four Fruits
ユーザー ThetaTheta
提出日時 2022-10-28 18:16:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 356 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 8,652 KB
最終ジャッジ日時 2023-09-19 09:50:15
合計ジャッジ時間 1,450 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,448 KB
testcase_01 AC 19 ms
8,436 KB
testcase_02 AC 19 ms
8,584 KB
testcase_03 AC 19 ms
8,520 KB
testcase_04 AC 20 ms
8,448 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 20 ms
8,500 KB
testcase_09 AC 19 ms
8,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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