結果

問題 No.265 数学のテスト
ユーザー cielciel
提出日時 2015-08-09 03:27:49
言語 Ruby
(3.2.2)
結果
AC  
実行時間 245 ms / 2,000 ms
コード長 432 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 11,488 KB
実行使用メモリ 31,676 KB
最終ジャッジ日時 2023-08-16 02:05:48
合計ジャッジ時間 5,504 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
15,404 KB
testcase_01 AC 77 ms
15,464 KB
testcase_02 AC 245 ms
31,676 KB
testcase_03 AC 160 ms
24,220 KB
testcase_04 AC 173 ms
24,680 KB
testcase_05 AC 195 ms
26,300 KB
testcase_06 AC 162 ms
24,236 KB
testcase_07 AC 182 ms
26,116 KB
testcase_08 AC 215 ms
28,808 KB
testcase_09 AC 166 ms
23,528 KB
testcase_10 AC 170 ms
24,084 KB
testcase_11 AC 186 ms
25,856 KB
testcase_12 AC 76 ms
15,284 KB
testcase_13 AC 87 ms
18,100 KB
testcase_14 AC 90 ms
17,184 KB
testcase_15 AC 76 ms
15,176 KB
testcase_16 AC 94 ms
16,816 KB
testcase_17 AC 75 ms
15,248 KB
testcase_18 AC 72 ms
15,280 KB
testcase_19 AC 74 ms
15,176 KB
testcase_20 AC 73 ms
15,516 KB
testcase_21 AC 69 ms
15,164 KB
testcase_22 AC 97 ms
17,748 KB
testcase_23 AC 68 ms
15,304 KB
testcase_24 AC 69 ms
15,300 KB
testcase_25 AC 119 ms
19,844 KB
testcase_26 AC 70 ms
15,364 KB
testcase_27 AC 72 ms
15,160 KB
testcase_28 AC 75 ms
15,816 KB
testcase_29 AC 69 ms
15,164 KB
testcase_30 AC 76 ms
15,656 KB
testcase_31 AC 70 ms
15,228 KB
testcase_32 AC 68 ms
15,124 KB
testcase_33 AC 70 ms
15,036 KB
testcase_34 AC 71 ms
15,260 KB
testcase_35 AC 74 ms
15,292 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

class Array
	def +(o) [self.size,o.size].max.times.map{|i|(self[i]||0)+(o[i]||0)} end
	def *(o)
		r=[]
		o.size.times{|i|r=r+i.times.map{0}.concat(self.map{|e|o[i]*e})}
		r
	end
end
def d(a) a.size<=1 ? [0] : 1.step(a.size-1).map{|i|i*a[i]} end
gets
D=gets.to_i
s=gets.chomp.gsub(/(\d+)/,'[\1]').gsub('x','[0,1]').gsub('d{','d(').gsub('}',')')
A=s.count('d(')>10000 ? [0] : eval(s)
puts A.concat((D+1-A.size).times.map{0}).join(' ')
0