标签:
#include<iostream> using namespace std; #define LINT int LINT count_number(LINT n) { LINT a=n; LINT re=0; while(1) { if(a==0) break; LINT b=a; a--; while((b!=0)&&(b%3==0)) { re++; b=b/3; } } return re; } int main() { cout<<count_number(30)<<endl; }
标签:
原文地址:http://www.cnblogs.com/yanliang12138/p/4628640.html