結果

問題 No.998 Four Integers
ユーザー ThetaTheta
提出日時 2022-10-21 14:06:34
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 178 ms / 1,000 ms
コード長 247 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 10,612 KB
実行使用メモリ 55,916 KB
最終ジャッジ日時 2023-09-13 15:28:44
合計ジャッジ時間 7,519 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 178 ms
29,472 KB
testcase_01 AC 138 ms
29,628 KB
testcase_02 AC 138 ms
29,672 KB
testcase_03 AC 137 ms
29,676 KB
testcase_04 AC 137 ms
29,596 KB
testcase_05 AC 141 ms
29,664 KB
testcase_06 AC 140 ms
29,624 KB
testcase_07 AC 139 ms
29,516 KB
testcase_08 AC 138 ms
29,672 KB
testcase_09 AC 133 ms
29,568 KB
testcase_10 AC 137 ms
29,608 KB
testcase_11 AC 136 ms
29,624 KB
testcase_12 AC 137 ms
29,420 KB
testcase_13 AC 136 ms
29,752 KB
testcase_14 AC 142 ms
29,512 KB
testcase_15 AC 137 ms
29,572 KB
testcase_16 AC 138 ms
29,632 KB
testcase_17 AC 140 ms
29,700 KB
testcase_18 AC 137 ms
29,516 KB
testcase_19 AC 140 ms
29,696 KB
testcase_20 AC 139 ms
29,656 KB
testcase_21 AC 138 ms
29,628 KB
testcase_22 AC 138 ms
29,640 KB
testcase_23 AC 137 ms
29,684 KB
testcase_24 AC 142 ms
55,916 KB
権限があれば一括ダウンロードができます

ソースコード

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