/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 117ms 11.664 MiB
#2 Accepted 88ms 10.922 MiB
#3 Accepted 88ms 11.297 MiB
#4 Accepted 88ms 11.281 MiB

Code

import java.util.Scanner;

public class Main {
    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:48:16
Judged At
2024-10-03 16:48:16
Judged By
Score
100
Total Time
117ms
Peak Memory
11.664 MiB