Rubyに投稿されたコード一覧
chars = [*"a".."z"] per=[12.31959369,0.8250647611,0,1.9310338607,6.7622950682,0.0191191647,1.8584790696,2.6301082644,11.740626672,0,5.9303670688,0,2.4648992608,7.4677425668,10.614067677,0.1907012631,0,4.6787983637,5.3219860638,6.6799356681,8.884030162,0.0078437652,2.140363965,0,3.7282335687,1.38148096] MAX = (ARGV.shift || 100).to_i
#! /usr/bin/ruby t = Time.now p t.year #=> 2012 p t.month #=> 3
def perfect_num n get_array(n, []) end def get_array(n, a)
def my_reverse(x) my_reverse_rec(x, []) end def my_reverse_rec(x, y)
$hai = [1,2,3,4,5] $s = 0 $t = $hai.length - 1
#encoding : sjis #Verilog HDLのラベルがないgenerate for文にラベルを付ける require 'fileutils' f = File.open(ARGV[0],"r")