wuyu

475685 · 发布于 2025-07-16 · 浏览 372 回复 1

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;

}

全部回复 共 1 条

  1. 许许 #1 ·

    对的

发表回复