HDACM 2549
注意 当输入 xx.xx 3(or4or5or6…) 时 输出为 0
import java.util.Scanner;public class Main{public static void main(String[] args) {Scanner sc = new Scanner(System.in);int t = sc.nextInt();while(t-->0){String num = sc.next();int index = num.indexOf('.');int n = sc.nextInt();if (n+index>num.length()-1) {System.out.println(0);continue;}System.out.println(num.charAt(index+n));}sc.close();}
}