题解 | #计算整数位数#
import java.util.Scanner; //这道题就没啥难度了吧...试一下富文本编辑器哈哈哈哈哈哈 public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int num = scan.nextInt(); scan.close(); //write code here...... if(num <= 0){ System.out.print(num); } else{ int pnum = 0; while(num > 0){ num /= 10; pnum ++; } System.out.print(pnum); } } }