結果

問題 No.796 well known
ユーザー foumifoumi
提出日時 2019-04-06 10:01:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 396 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 9,392 KB
最終ジャッジ日時 2023-09-05 20:39:43
合計ジャッジ時間 4,536 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
9,392 KB
testcase_01 AC 23 ms
9,292 KB
testcase_02 AC 22 ms
9,280 KB
testcase_03 AC 22 ms
9,200 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import random
from functools import reduce
from operator import mul
N = int(input())
l = []
limit = 312456

def random_list():
    for i in range(N):
        l.append(random.randint(0, (limit) - sum(l)))

for x in range(limit**N):
    random_list()
    if sum(l) % 3 == 1 and reduce(mul, l) % 3 == 0:
        l = list(map(str, l))
        print(' '.join(l))
        break
    else:
        l = []
0