Accepted
Code
#include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin>>n;
int cnt=0;
while(n>0){
if(n>=2){
if(n>=3){
n-=3;
cnt++;
if(n==1){
cnt++;
break;
}
}
else{
n-=2;
cnt++;
if(n==1){
cnt++;
break;
}
}
}
}
cout<<cnt<<endl;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1106 too easy or three easy
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-11-05 14:57:12
- Judged At
- 2024-11-11 02:32:01
- Judged By
- Score
- 100
- Total Time
- 2ms
- Peak Memory
- 528.0 KiB