fork download
  1. test=gets.to_i
  2. while test>0
  3. s=gets.chomp
  4. count=0
  5. for i in 0...s.length
  6. if s[i]!='4' && s[i]!='7'
  7. count=count+1
  8. end
  9. puts s[i]+count.to_s
  10. end
  11. puts count
  12. test=test-1
  13. end
Success #stdin #stdout 0s 4760KB
stdin
3
23
47
99
stdout
21
32
2
40
70
0
91
92
2