We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Introduction
- Java Datatypes
- Discussions
Java Datatypes
Java Datatypes
Sort by
recency
|
1529 Discussions
|
Please Login in order to post a comment
The simplest way is
import java.util.*;
class Solution { public static void main(String[] argh) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();
}
Working code
whats my mistake
Can someone tell me why I can't pass the private testcase
import java.util.; import java.io.;
class Solution{ public static void main(String []argh) {
}
import java.util.Scanner;
public class Solution { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int t = scanner.nextInt(); while (t-- > 0) { String input = scanner.next(); try { long n = Long.parseLong(input); System.out.println(input + " can be fitted in:");
}