#include <stdio.h>
int main() {
int n, c = 0, ans = 0;
scanf("%d", &n);
while (n > 0) {
c++;
if (n % 3 == 1 && ans == 0) {
ans = c;
}
int s = n * 1.0 / 3 + 0.99999;
n = n - s;
}
printf("%d %d", c, ans);
}
全部回复 共 0 条
还没有人回复。往下写第一条。
发表回复
登录后即可回复本帖,与出题人和同学一起讨论。
登录