結果

問題 No.998 Four Integers
ユーザー lam6er
提出日時 2025-03-20 18:41:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 1,000 ms
コード長 271 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 82,472 KB
実行使用メモリ 53,556 KB
最終ジャッジ日時 2025-03-20 18:41:48
合計ジャッジ時間 1,890 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

nums = list(map(int, input().split()))
unique = set(nums)
if len(unique) != 4:
    print("No")
else:
    s = sorted(nums)
    max_val = s[3]
    min_val = s[0]
    if max_val - min_val == 3 and sum(s) == 4 * min_val + 6:
        print("Yes")
    else:
        print("No")
0