res = []; for try_ = 1:100 hp_red = 100; hp_blue = 100; while 1 br = 0; res(try_) = 0; hp_red = hp_red - 1; if hp_red <= 0 res(try_) = res(try_) + 1; br = 1; end end for j = 1:4 hp_blue = hp_blue - 1; if hp_blue <= 0 res(try_) = res(try_) + 2; br = 1; break; end end end if br == 1 break; end end end sum (res == 1) sum (res == 2) sum (res == 3)
Standard input is empty
ans = 44 ans = 53 ans = 3
warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/__all_opts__.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/optimset.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fminbnd.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fminbnd.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/set/unique.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/general/isvector.m' is in the future warning: timestamp on file /usr/lib/i386-linux-gnu/octave/3.6.2/oct/i486-pc-linux-gnu/find.oct is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fminunc.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fminunc.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fminunc.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fsolve.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fsolve.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fsolve.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fsolve.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fzero.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/fzero.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/lsqnonneg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/pqpnonneg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/optimization/qp.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/pkg/pkg.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/miscellaneous/fullfile.m' is in the future warning: timestamp on file /usr/lib/i386-linux-gnu/octave/3.6.2/oct/i486-pc-linux-gnu/cellfun.oct is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/strings/cstrcat.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/miscellaneous/ispc.m' is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/miscellaneous/fileattrib.m' is in the future warning: timestamp on file /usr/lib/i386-linux-gnu/octave/3.6.2/oct/i486-pc-linux-gnu/strfind.oct is in the future warning: timestamp on file /usr/lib/i386-linux-gnu/octave/3.6.2/oct/i486-pc-linux-gnu/rand.oct is in the future warning: time stamp for `/usr/share/octave/3.6.2/m/startup/__finish__.m' is in the future