Search found 3 matches

by stadoblech
Fri Nov 09, 2012 3:54 pm
Forum: Volume 6 (600-699)
Topic: 694 - The Collatz Sequence
Replies: 46
Views: 21959

694 - The Collatz Sequence - Time limit exceeded


import java.io.PrintWriter;
import java.util.Scanner;


public class Main {

public static void main(String[] args) throws Exception{

Scanner scan = new Scanner(System.in);

int A = 0;
int limit = 0;

while(scan.hasNextInt()) {
A = scan.nextInt();
limit = scan.nextInt();
if(A == -1 ...
by stadoblech
Fri Nov 09, 2012 2:19 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 21973

Re: 445 - Marvelous Mazes - Wrong answer

brianfry713 wrote:Try input 123T, output should be TTTTTT
i tried and works fine... really dont know whats wrong ...
by stadoblech
Thu Nov 08, 2012 6:42 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 21973

445 - Marvelous Mazes - Wrong answer

im having wrong answer here



import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

public static void main(String[] args) {

String line;
Scanner scan = new Scanner(System.in);

while(scan.hasNextLine()) {
line = scan.nextLine ...

Go to advanced search