結果

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

ソースコード

diff #

n = gets.chomp
tot = 2
tot2 = 1
qq  = [3,1,1,1,3,1,3,1,4,3]
qq2 = [3,2,2,2,3,2,3,2,4,3]
for c in n.split('')
  tot += qq[c.ord - 48]
  tot2 += qq2[c.ord - 48]
end
puts [tot, tot2].min
0