Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Solution {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int n = sc.nextInt();
- int ans = 1;
- while(ans*ans<=n){
- ans++;
- }
- ans--;
- System.out.println(ans);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment