結果

問題 No.1089 三変数方程式
ユーザー ThetaTheta
提出日時 2022-10-20 11:01:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 391 ms / 2,000 ms
コード長 273 bytes
コンパイル時間 526 ms
コンパイル使用メモリ 10,472 KB
実行使用メモリ 7,892 KB
最終ジャッジ日時 2023-09-12 17:10:00
合計ジャッジ時間 4,328 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,796 KB
testcase_01 AC 15 ms
7,760 KB
testcase_02 AC 20 ms
7,812 KB
testcase_03 AC 257 ms
7,780 KB
testcase_04 AC 26 ms
7,788 KB
testcase_05 AC 391 ms
7,840 KB
testcase_06 AC 92 ms
7,776 KB
testcase_07 AC 49 ms
7,780 KB
testcase_08 AC 319 ms
7,852 KB
testcase_09 AC 23 ms
7,788 KB
testcase_10 AC 276 ms
7,800 KB
testcase_11 AC 90 ms
7,892 KB
testcase_12 AC 212 ms
7,884 KB
testcase_13 AC 92 ms
7,724 KB
testcase_14 AC 239 ms
7,800 KB
testcase_15 AC 321 ms
7,780 KB
testcase_16 AC 276 ms
7,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    ctr = 0
    for x in range(N+1):
        for y in range(N+1-x):
            z = N - (x + y)
            if z >= 0:
                ctr += 1
            else:
                break

    print(ctr)


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