Competitive Programming Solutions

GitHub
back to dashboard

D. Fixed Password

Codeforces - Sheet #2 (Loops) · limit: 1s · memory: 256MB · view on codeforces

input

2200
1020
1999
1000
9999

output

Wrong
Wrong
Correct
Main.java
static void solve() {

        // Write your solution here
        while(true){
            int n = in.nextInt();
            if(n == 1999){
                out.println("Correct");
                return;
            } else {
                out.println("Wrong");
            }
        }
    }