結果

問題 No.327 アルファベット列
ユーザー LeonardoneLeonardone
提出日時 2015-12-20 01:44:53
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 1,041 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 11,964 KB
実行使用メモリ 16,144 KB
最終ジャッジ日時 2023-10-17 13:12:34
合計ジャッジ時間 8,411 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
16,144 KB
testcase_01 AC 85 ms
16,028 KB
testcase_02 AC 85 ms
16,028 KB
testcase_03 AC 85 ms
16,028 KB
testcase_04 AC 87 ms
16,028 KB
testcase_05 AC 86 ms
16,028 KB
testcase_06 AC 88 ms
16,028 KB
testcase_07 AC 91 ms
16,024 KB
testcase_08 AC 105 ms
16,144 KB
testcase_09 AC 123 ms
16,144 KB
testcase_10 AC 268 ms
16,144 KB
testcase_11 AC 450 ms
16,144 KB
testcase_12 AC 1,903 ms
16,144 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#! ruby
# yukicoder My Practice
# author: Leonardone @ NEETSDKASU
############################################################
def gs() gets.chomp end
def gi() gets.to_i end
def gss() gs.split end
def gis() gss.map(&:to_i) end
def nmapf(n,f) n.times.map{ __send__ f } end
def ngs(n) nmapf n,:gs end
def ngi(n) nmapf n,:gi end
def ngss(n) nmapf n,:gss end
def ngis(n) nmapf n,:gis end
def arr2d(h,w,v=0) h.times.map{[v] * w} end
def for2p(hr,wr,&pr) hr.each{|i|wr.each{|j| yield(i,j)}} end
def nsum(n) n * (n + 1) / 2 end
def vcount(d,r=Hash.new(0)) d.inject(r){|r,e| r[e]+=1;r} end
############################################################

class Abc
    @@al = ('A'..'Z').to_a
    def initialize()
        @a = [1]        
    end
    def inc()
        i = 0
        loop {
            @a[i] += 1
            break if @a[i] <= 26
            @a[i] = 1
            i += 1
            @a << 0 if @a.size == i
        }
    end
    def to_s() @a.reverse.map{|e| @@al[e-1]}*"" end
end

n = gi

abc = Abc.new
n.times {abc.inc}
puts abc.to_s

0