AC

名字不要取太长像我这样应该刚刚好  •  20天前


include <bits/stdc++.h>

using namespace std;

int main() {

int n, day = 0, a, b, c = 1;
cin >> n;
while (1) {
	day++;
	if (c == 1 && (n - 1) % 3 == 0) {
		b = day;
		c = 0;
	}
	a = (n - 1) / 3 + 1;
	n -= a;
	if (n == 0)
		break;
}
cout << day << " " << b;
return 0;

}


评论:

请先登录,才能进行评论