/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 1ms 520.0 KiB
#3 Accepted 1ms 324.0 KiB
#4 Accepted 1ms 324.0 KiB

Code

#include <bits/stdc++.h>
#define ll long long
int const p = 1e9+7;
#define pb push_back



//Check
// bool isPrime(ll n){if(n<=1)return false;if(n<=3)return true;if(n%2==0||n%3==0)return false;for(int i=5;i*i<=n;i=i+6)if(n%i==0||n%(i+2)==0)return false;return true;}
// bool isPowerOfTwo(ll n){if(n==0)return false;return (ceil(log2(n)) == floor(log2(n)));}
// bool isPerfectSquare(ll x){if (x >= 0) {ll sr = sqrt(x);return (sr * sr == x);}return false;}
// int exponentMod(int A, int B, int C) 
// { 
//     if (A == 0) return 0; 
//     if (B == 0) return 1; 
//     long long y; 
//     if(B % 2 == 0){ 
//         y = exponentMod(A, B / 2, C); 
//         y = (y * y) % C; 
//     }else { 
//         y = A % C; 
//         y = (y * exponentMod(A, B - 1, C) % C) % C; 
//     } 
//     return (int)((y + C) % C); 
// } 
 
using namespace std;

int main() {
    ios::sync_with_stdio(false); cin.tie(0);
    int n; cin >> n;
    if(n%3==0){
    cout << n/3 << '\n';
    }else {
        cout << (n/3 +1) << '\n';
    }   
}

Information

Submit By
Type
Submission
Problem
P1106 too easy or three easy
Contest
Brain Booster #6
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-03 15:37:34
Judged At
2024-12-17 11:36:33
Judged By
Score
100
Total Time
1ms
Peak Memory
520.0 KiB