提交时间:2020-10-31 19:51:11

运行 ID: 8376

package javaapplication1; import java.util.Scanner; public class JavaApplication1 { static long a, b, n; static void getInput() { Scanner sc = new Scanner(System.in); a = sc.nextLong(); b = sc.nextLong(); n = sc.nextLong(); sc.close(); } static void calc() { long _扩大倍数 = (long) Math.pow(10, (n - 1) + 3); long _a扩大后 = a * _扩大倍数; long _商 = _a扩大后 / b; long _后三位 = _商 % 10; System.out.println(_后三位); } public static void main(String[] args) { getInput(); calc(); } }