結果

問題 No.998 Four Integers
ユーザー Theta
提出日時 2022-10-21 14:06:34
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 562 ms / 1,000 ms
コード長 247 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 80,720 KB
最終ジャッジ日時 2024-07-01 00:04:26
合計ジャッジ時間 15,517 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np


def main():
    integers = sorted(map(int, input().split()))
    diff = np.diff(integers)
    if all(map(lambda num: num == 1, diff)):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
0