結果
| 問題 |
No.1934 Four Fruits
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-13 21:26:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 45 ms / 2,000 ms |
| コード長 | 530 bytes |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 82,568 KB |
| 実行使用メモリ | 55,340 KB |
| 最終ジャッジ日時 | 2024-07-22 00:56:46 |
| 合計ジャッジ時間 | 1,110 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
import sys
sys.setrecursionlimit(10 ** 7)
def get_list(ty=int):
return list(map(ty, input().split()))
def get_int():
return int(input())
def get_str():
return input()
A, B, C = get_list()
if len({A, B, C}) == 1:
print(A)
exit(0)
from collections import defaultdict
d = defaultdict(int)
for x in [A, B, C]:
d[x] += 1
if any(d[k] == 1 for k in d.keys()) and any(d[k] == 2 for k in d.keys()):
print(max(k for k in d.keys() if d[k] == 1))
exit(0)
print(list({0, 1, 2, 3} - {A, B, C})[0])