結果

問題 No.941 商とあまり
ユーザー maspy
提出日時 2019-12-04 12:45:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 454 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,732 KB
最終ジャッジ日時 2024-11-30 06:00:16
合計ジャッジ時間 7,686 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 4
other AC * 58 WA * 2 RE * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,X,*A = map(int,read().split())

Aplus = [x + 1 for x in A]

p = 1
for x in Aplus:
    p *= x
    if p > X:
        break
p -= 1

if p > X:
    answer = '0' * X
    print(answer)
    exit()

if any(x == 1 for x in A):
    # p 以上が全部作れる
    answer = '0' * (p-1) + '1' * (X - p + 1)
    print(answer)
    exit()

# RE
raise
0