結果
問題 |
No.1934 Four Fruits
|
ユーザー |
|
提出日時 | 2023-03-31 07:15:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 403 bytes |
コンパイル時間 | 223 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-22 13:44:39 |
合計ジャッジ時間 | 1,157 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
fruits = list(map(int, input().split())) cnt = {0: 0, 1: 0, 2: 0, 3: 0} for f in fruits: cnt[f] += 1 res = list(map(lambda x: x != 0, cnt.values())) if sum(res) == 1: for k, c in cnt.items(): if c == 3: print(k) elif sum(res) == 2: for k, c in cnt.items(): if c == 1: print(k) else: for k, c in cnt.items(): if c == 0: print(k)