import java.io.*;
public class Main
{
public static void main (String[] args)
{
final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line;
try
{
while ((line=reader.readLine ())!=null)
{
try
{
String[] words=line.split (" ");
int a=Integer.parseInt ...
Search found 4 matches
- Tue Dec 30, 2008 11:47 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 319833
- Sun Dec 28, 2008 9:58 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 319833
Re: If you get WA in problem 100, read me before post!
Send this, get WA, dont know why. Works with the test cases i have found with any order (i>j and i<j)
import java.io.*;
public class Main
{
public static void main (String[] args) throws Exception
{
final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line ...
import java.io.*;
public class Main
{
public static void main (String[] args) throws Exception
{
final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line ...
- Sun Dec 28, 2008 9:08 pm
- Forum: Java
- Topic: How to I disply only 3 numbers after dot of double?
- Replies: 3
- Views: 4787
Re: How to I disply only 3 numbers after dot of double?
double a1=2.02356323; // Any double //
DecimalFormat df=new DecimalFormat ("0.000");
String a2=df.format (a1);
System.out.println (a2);
DecimalFormat is in this package: java.text.DecimalFormat;
DecimalFormat df=new DecimalFormat ("0.000");
String a2=df.format (a1);
System.out.println (a2);
DecimalFormat is in this package: java.text.DecimalFormat;
- Sun Dec 28, 2008 8:53 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 319833
Why WA???
Send this, get WA, dont know why. Works with the test cases i have found with any order (i>j and i<j)
import java.io.*;
public class Main
{
public static void main (String[] args) throws Exception
{
final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line ...
import java.io.*;
public class Main
{
public static void main (String[] args) throws Exception
{
final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line ...