結果
| 問題 | No.1934 Four Fruits |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-03-31 07:15:43 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 95 ms / 2,000 ms |
| コード長 | 403 bytes |
| 記録 | |
| コンパイル時間 | 311 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 15,356 KB |
| 最終ジャッジ日時 | 2026-04-10 19:35:00 |
| 合計ジャッジ時間 | 2,172 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)