red = []; blue = []; for try_ = 1:100 hp_red = 100; hp_blue = 100; while 1 hp_red = hp_red - 1; end hp_blue = hp_blue - 4; end br = 0; red(try_) = 0; if hp_blue <= 0 red(try_) = 2; br = 1; end if hp_red <= 0 red(try_) = red(try_) + 1; br = 1; end if br == 1 break; end end end sum( red == 0) sum (red == 1) sum (red == 2) sum (red == 3)
Standard input is empty
ans = 0 ans = 51 ans = 49 ans = 0
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