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
|
1509 Discussions
|
Please Login in order to post a comment
JAVA15
import java.io.; import java.util.;
public class Solution {
}
import java.util.; import java.io.;
class Solution{ public static void main(String []argh) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();
}
Test Case 2 & 3 everytime fails with truncated everytime although the code getting passed with the same input with "Run With Code" Option and also in my local IntelliJIdea. its only because the output and input both getting truncated. Please help how to solve?
import java.util.; import java.io.; import static java.lang.Math.pow;
class Solution{ public static void main(String []argh) { Scanner sc = new Scanner(System.in); int t=sc.nextInt(); // lon//g x=sc.nextLong();
}
output without error: 22 0 can be fitted in: * byte * short * int * long 1 can be fitted in: * byte * short * int * long -1 can be fitted in: * byte * short * int * long 18446744073709551616 can't be fitted anywhere. -18446744073709551616 can't be fitted anywhere. 18446744073709551615 can't be fitted anywhere. -18446744073709551616 can't be fitted anywhere. 32768 can be fitted in: * short * int * long -32768 can be fitted in: * short * int * long 32767 can be fitted in: * short * int * long -32767 can be fitted in: * short * int * long 2147483648 can be fitted in: * long 2147483647 can be fitted in: * int * long -2147483648 can be fitted in: * int * long -2147483647 can be fitted in: * int * long 128 can be fitted in: * short * int * long 127 can be fitted in: * byte * short * int * long -128 can be fitted in: * byte * short * int * long -127 can be fitted in: * byte * short * int * long 123123123333333333333333333333333313123123 can't be fitted anywhere. 234444444444444444444444444444444444444 can't be fitted anywhere.
-1222222 can be fitted in: * int * long
import java.util.Scanner;
public class Solution{ public static void main(String[] args){
If there is any eroor please let me know...
}
import java.util.; import java.io.;
public class Solution3 {
}
}