ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1785. Lost in Localization

What is wrong? java
Posted by Unik 15 Oct 2013 00:21
import java.util.*;

public class My {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int a = in.nextInt();

        if ((a >= 1) && (a <= 4)){
            System.out.println("few");
        } else if ((a >= 5) && (a <= 9)){
            System.out.println("several");
        } else if ((a >= 10) && (a <= 19)){
            System.out.println("pack");
        } else if ((a >= 20) && (a <= 49)){
            System.out.println("lots");
        } else if ((a >= 50) && (a <= 99)){
            System.out.println("horde");
        } else if ((a >= 100) && (a <= 249)){
            System.out.println("throng");
        } else if ((a >= 250) && (a <= 499)){
            System.out.println("swarm");
        } else if ((a >= 500) && (a <= 999)){
            System.out.println("zounds");
        } else if (a > 1000){
            System.out.println("legion");
        }

    }

}
Re: What is wrong? java
Posted by Alexey Dergunov [Samara SAU] 15 Oct 2013 02:18
Try this test:

1000
Re: What is wrong? java
Posted by Unik 15 Oct 2013 23:06
I did a test 1000