結果
| 問題 | No.1934 Four Fruits |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-09 20:57:44 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 518 bytes |
| 記録 | |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 96,108 KB |
| 実行使用メモリ | 78,796 KB |
| 最終ジャッジ日時 | 2026-07-08 14:42:58 |
| 合計ジャッジ時間 | 2,084 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
a, b, c = map(int, input().split())
freq = {}
for x in (a, b, c):
freq[x] = freq.get(x, 0) + 1
if len(freq) == 1:
print(a)
else:
max_count = max(freq.values())
if max_count == 2:
# Find the element with count 1
for key, count in freq.items():
if count == 1:
print(key)
break
else:
# All three are different, find missing one
for i in range(4):
if i not in freq:
print(i)
break
lam6er