Solution for CCC '04 J1 - Squares in Java 8


Nov. 4, 2019 0.784830 seconds Java 8
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = (int)Math.sqrt(in.nextInt());
        System.out.println("The largest square has side length " + a + ".");
    }
}

Editorial


No editorial for this problem. :(

Original Problem


You can view the original page for this problem on the DMOJ.