#!usr/bin/env ruby # -*- coding: utf-8 -*- #class Coor # def x # @x # end # def y # @y # end #end puz = [] puz_num = 1 i = 0 puz_type = gets.to_i puz_type. times do puz << puz_num puz_num += 1 end puz.shuffle! puz_row = (puz.length + 1) ** (1/2.0) while puz.length n = puz[i] printf("%s",n.to_s) i += 1 end