wuyu

博约8486  •  30天前


include<bits/stdc++.h>

using namespace std; int main(){

int n;
cin >> n;
bool f = true;
int day = 1;
int b;
while(n){
	if(n % 3 != 0){
		if(n % 3 == 1 && f){
			
			b = day;
			f = false;
		}
		n -= n / 3 + 1; 
	}else n -= n / 3;
	day++;
}
cout << day - 1 << " " << b;

}


评论:

对的


许许  •  30天前

请先登录,才能进行评论