2016/4/21
time mruby/bin/mruby 100dice.rb
dekita!! 2, 169015542
real 14m27.481s
user 14m23.068s
sys 0m1.729s
outside = 0
num = Array.new(100, 0)
while true
base = rand(6)+1
outside += 1
done = true
11.times do |inside|
eye = rand(6)+1
unless base == eye
#print "#{outside}回目の挑戦は#{inside}回目の試行で失敗しました。"
num[inside] += 1
done = false
end
end
if(done) then
puts "dekita!! #{base}, #{outside}"
break
end
end
time ruby 100dice.rb
dekita!! 5, 20292418
real 1m0.493s
user 0m56.155s
sys 0m0.158s
/*
* runstant
*/
window.onload = function() {
// TODO: write code
// console.log("Hello, runstant!");
console.log(String.fromCharCode(0x3042));
console.log(String.fromCharCode(0xD867)+String.fromCharCode(0xDE3D));
console.log(String.fromCodePoint(0x29E3D));
for(let i=0x3042; i < 0x3042+90; i++) {
console.log(String.fromCodePoint(i));
}
};