START:

写写写,水博文就完事。

代码实现

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
string radix_change(int n, int radix)
{
queue<int> q;
for (int i = 0; n = 0; i++)
{
q.push(n % radix);
n /= radix;
}
int _r = 1;
int re = 0;
while (!q.empty())
{
int front = q.front();
q.pop();
front *= _r;
_r *= radix;
re += front;

}
string str;
ostringstream stream;
stream << re;//1 s
str = stream.str();
return str;//1 e

}

END

相关文章
评论
分享
Please check the post_relate setting in config.yml of hexo-theme-Annie! You should make sure 'postsEnable == true' and the number of site posts greater than 1.
Please check the comment setting in config.yml of hexo-theme-Annie!