結果

問題 No.998 Four Integers
ユーザー lam6er
提出日時 2025-03-20 20:16:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 1,000 ms
コード長 271 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 82,704 KB
実行使用メモリ 53,824 KB
最終ジャッジ日時 2025-03-20 20:17:09
合計ジャッジ時間 1,884 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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