/ SeriousOJ /

Record Detail

Compile Error

Main.java:2: error: class Problem1 is public, should be declared in a file named Problem1.java
public class Problem1 {
       ^
1 error

Code

import java.util.Scanner;
public class Problem1 {

	public static void main(String[] args) {
		Scanner S = new Scanner(System.in);
		int N = S.nextInt();
		int op = 0;
		
		while(N>0) {
			if(N%3 ==0) {
				N-=3;
			}else {
				N-=2;
			}
			op++;
		}
		System.out.println(op);
	}

}

Information

Submit By
Type
Submission
Problem
P1106 too easy or three easy
Contest
Brain Booster #6
Language
Java 8 (OpenJDK 1.8.0_422)
Submit At
2024-10-03 16:45:51
Judged At
2024-10-03 16:45:51
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes