题解(求赞)
2024-09-27 21:23:16
发布于:广东
18阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int dyr(){
ll n,time=0,r=0,g=0;
cin>>n;
while(n>0){
r++;
if(n%3==1&&time==0) time=r;
n=n-ceil(n/3.0);
}
cout<<r<<' '<<time;
return 0;
}
int main(){
freopen("apple.in","r",stdin);
freopen("apple.out","w",stdout);
dyr();
fclose(stdin);
fclose(stdout);
return 0;
}
这里空空如也
有帮助,赞一个