ac

zhyf · 发布于 2025-08-17 · 浏览 476 回复 1

include <bits/stdc++.h>

using namespace std;

int main() {

int cnt = 0, ans = 0, n;
cin >> n;
while (n) {
	cnt++;
	if (n % 3 == 1 && ans == 0) {
		ans = cnt;
	}
	n -= (n + 2) / 3;
}
cout << cnt << " " << ans;
return 0;

}

全部回复 共 1 条

  1. み柒壹ン #1 ·

    感觉你很靠谱,真的

发表回复