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'.
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.
小白菜