ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1206. Sum of Digits of the Sum of Numbers

Wrong answer test 4 in Java 1.7 please help me
Posted by Axmadjon 5 May 2014 17:02
import java.util.Scanner;


public class _1206 {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = 36;
        long k = s.nextInt();
        while (k > 1) {
            n *= 55;
            k--;
        }
        System.out.println(n);
    }
}

Edited by author 05.05.2014 17:02
Re: Wrong answer test 4 in Java 1.7 please help me
Posted by mberdyshev 9 Jun 2017 14:32
Use BigInteger