Codeforces_334_C

http://codeforces.com/problemset/problem/334/C

求不能凑整n,和最小,数量最多的数量。

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
using namespace std;

int main()
{
    long long n;
    scanf("%I64d",&n);
    while(n%3 == 0)
    {
        n /= 3;
    }
    printf("%I64d
",n/3+1);
    return 0;
}
原文地址:https://www.cnblogs.com/zhurb/p/5940650.html