結果
問題 |
No.10 +か×か
|
ユーザー |
![]() |
提出日時 | 2020-09-03 08:43:17 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 366 bytes |
コンパイル時間 | 337 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 128,128 KB |
最終ジャッジ日時 | 2024-11-22 19:27:49 |
合計ジャッジ時間 | 31,618 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 TLE * 5 |
ソースコード
from itertools import product n = int(input()) tot = int(input()) a = list(map(int, input().split())) for p in product(range(2), repeat=n-1): cur = a[0] for i in range(n - 1): if not p[i]: cur += a[i + 1] else: cur *= a[i + 1] if cur == tot: print(''.join('+' if not op else '*' for op in p)) break