Competitive Programming Solutions

GitHub
back to dashboard

A. 1 to N

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

input

5

output

1
2
3
4
5
Main.java
static void solve() {

        // Write your solution here
        int n = in.nextInt();
        int i = 1;
        while(i <= n){
            out.println(i++);
        }
    }