输入n,查找1到n之间包含多少个“1”,例如1-11之间包含4个“1”(1,10,11共四个“1”)
importjava.util.Scanner;publicclassSelectNum1{publicstaticvoidmain(String[]args){longcount=0;//用来记录“1”的个数Scannerinput=newScanner(System.in);System.out.println("请输入数字n:");longn=input.nextLong();//接收数字n