結果

問題 No.10 +か×か
ユーザー syarosyaro
提出日時 2016-01-17 01:46:24
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 193 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 11,940 KB
実行使用メモリ 67,440 KB
最終ジャッジ日時 2023-10-20 00:24:48
合計ジャッジ時間 9,178 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 OLE -
testcase_04 WA -
testcase_05 WA -
testcase_06 OLE -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,t,*a=gets(p).split.map &:to_i
d=(0..n-=1).map{[]}
n.downto(d[n][t]=1){|i|1.upto(t){|j|d[i-1][j]=d[i][j+a[i]]||d[i][j*a[i]]}}
v,=a
p d
1.upto(n){|i|putc (f=d[i][n=v+a[i]])??+:?*;v=f ?n:v*a[i]}
0