結果

問題 No.2054 Different Sequence
ユーザー kept1994kept1994
提出日時 2022-11-04 02:05:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 795 ms
コンパイル使用メモリ 86,692 KB
実行使用メモリ 71,416 KB
最終ジャッジ日時 2023-09-25 08:26:32
合計ジャッジ時間 4,599 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,372 KB
testcase_01 AC 70 ms
71,300 KB
testcase_02 AC 69 ms
71,116 KB
testcase_03 AC 70 ms
71,412 KB
testcase_04 AC 68 ms
71,116 KB
testcase_05 AC 69 ms
70,900 KB
testcase_06 AC 70 ms
71,276 KB
testcase_07 AC 69 ms
71,416 KB
testcase_08 AC 69 ms
71,268 KB
testcase_09 AC 69 ms
71,224 KB
testcase_10 AC 72 ms
71,376 KB
testcase_11 AC 71 ms
71,232 KB
testcase_12 AC 73 ms
71,332 KB
testcase_13 AC 72 ms
70,912 KB
testcase_14 AC 70 ms
71,048 KB
testcase_15 AC 70 ms
71,360 KB
testcase_16 AC 70 ms
71,112 KB
testcase_17 AC 70 ms
71,252 KB
testcase_18 AC 70 ms
71,244 KB
testcase_19 AC 72 ms
71,372 KB
testcase_20 AC 70 ms
71,404 KB
testcase_21 AC 70 ms
71,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
def getArithmeticSequenceSum(a0: int, l: int, n: int):
    return (a0 + l) * n // 2

def main():
    N, M = map(int, input().split())
    l = getArithmeticSequenceSum(1, N, N)
    print("Yes" if M >= l else "No")
    return

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