結果

問題 No.509 塗りつぶしツール
ユーザー mai
提出日時 2017-04-28 22:31:17
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 225 bytes
コンパイル時間 236 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-09-13 18:04:22
合計ジャッジ時間 3,913 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def scan; gets.split.map(&:to_i); end
    
line = gets.chomp
n = line.size

s={}
(0..9).each{|e|s[e.to_s]=0}

line.chars{|c| s[c]+=1 }

cnt = 0

cnt += n

cnt += 1

cnt += s["0"]+s["4"]+s["6"]+s["8"]*2+s["9"]

cnt += n

p cnt
0