結果

問題 No.689 E869120 and Constructing Array 3
ユーザー daku9640daku9640
提出日時 2018-05-19 01:05:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 297 ms / 1,000 ms
コード長 321 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 7,980 KB
最終ジャッジ日時 2023-09-10 23:34:40
合計ジャッジ時間 4,234 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,844 KB
testcase_01 AC 15 ms
7,956 KB
testcase_02 AC 16 ms
7,796 KB
testcase_03 AC 41 ms
7,788 KB
testcase_04 AC 87 ms
7,836 KB
testcase_05 AC 142 ms
7,836 KB
testcase_06 AC 204 ms
7,936 KB
testcase_07 AC 232 ms
7,868 KB
testcase_08 AC 274 ms
7,924 KB
testcase_09 AC 296 ms
7,876 KB
testcase_10 AC 279 ms
7,944 KB
testcase_11 AC 284 ms
7,928 KB
testcase_12 AC 297 ms
7,824 KB
testcase_13 AC 16 ms
7,796 KB
testcase_14 AC 16 ms
7,980 KB
testcase_15 AC 15 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    k = int(input())
    for a in range(251):
        for b in range(251 - a):
            for c in range(251 - a - b):
                if (a + b) * (a + b - 1) // 2 - b * (b - 1) // 2 + c == k:
                    return [1] * a + [2] * b + [7] * c + [24]
    return [0]
v = solve()
print(len(v))
print(*v)
0