标签:cst highlight str while class space main can cpp
#include <cstdio> #include <iostream> using namespace std; long long k,n,ans; int main(){ scanf("%lld%lld",&k,&n); long long x=1; while(n){ if(n&1)ans+=x; x*=k; n>>=1; } printf("%lld\n",ans); return 0; }
标签:cst highlight str while class space main can cpp
原文地址:http://www.cnblogs.com/codetogether/p/7651992.html