/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 97ms 10.949 MiB
#2 Accepted 98ms 10.793 MiB
#3 Accepted 96ms 11.078 MiB
#4 Accepted 96ms 10.938 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-11-11 02:47:29
Judged By
Score
100
Total Time
98ms
Peak Memory
11.078 MiB