• [E] Meow star people learning numbers

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Meow star people have a different way of counting. They use J、A、B、C……H、J to represent decimal system. A small cat had just learned it these days, she wrote it again and again, A, B, C, D,……AJ, AA, AB……。One day she wrote many numbers, for example, from A to AJJJ. She was tired of it, and want to calculate how many 'A'were in these numbers, for example there were 2 number of 'A'in number 'AJA'.


  • 输入
  • There are many cases, each contain a string N, means numbers from A to N(1<= strlen <= 9), see more details in hint please.
  • 输出
  • For each case, print the number of 'A'.
  • 样例输入
  • H
    AC
    
  • 样例输出
  • 1
    6
    
  • 提示
  • If N = AC, the numbers are A、B、C、D、E、F、G、H、I、AJ、AA、AB、AC. So we print 6.
  • 来源
  • 小白菜
  • 操作

显示春菜