- import java.math.BigInteger;
- import java.util.Scanner;
- public class Main {
- public static void main(String args[]) {
- Scanner sc = new Scanner(System.in);
- int n = sc.nextInt();
- sc.close();
- BigInteger bi = BigInteger.ZERO;
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < n; i++) {
- sb.append(n);
- bi = bi.add(new BigInteger(sb.toString()));
- }
- System.out.println(bi);
- }
- }
复制代码 |