/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 532.0 KiB
#2 Accepted 2ms 532.0 KiB
#3 Accepted 4ms 532.0 KiB
#4 Accepted 4ms 532.0 KiB

Code

/* Solved by Sakhawat Hossain Mahin, CSE-28th, SMUCT */
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long
#define fastIO ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

int32_t main()
{
    fastIO

    int n;
    cin>>n;

    int cnt = 0;
    while(n){
        if(n % 3 == 0){
            n -= 3;
        }
        else{
            n-=2;
        }
        cnt++;
    }

    cout << cnt << endl;

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1106 too easy or three easy
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-04 12:20:31
Judged At
2024-10-04 12:20:31
Judged By
Score
100
Total Time
4ms
Peak Memory
532.0 KiB