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

Solution - Wrogn Answer!!! Why? Java
Posted by badion 18 Mar 2013 14:48
import java.util.*;
public class LavinInteractive {


    public static void main(String[] args) {

        int n;
            Scanner rc = new Scanner(System.in);
            System.out.print("Введите число: ");
            n = rc.nextInt();

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



    }

}
Re: Solution - Wrogn Answer!!! Why? Java
Posted by Andrey Lopukhov 26 Mar 2013 03:36
System.out.print("Введите число: ");
=) quess reason