歡迎您來到Tanky Woo的博客:
我們的【C++奮斗樂園】
C++/算法網站:www.cpply.com
C++/算法論壇:www.cppleyuan.com
QQ群:①群:19333724 ②群:23840480 ③群:17314377 ④群:23829384
今天論壇的ambition發了一個帖子:
http://www.cppleyuan.com/redirect.php?tid=1171&goto=lastpost#lastpost
看了下,感覺題目很不錯,ambition的思路也很好。
涉及到了m^n,我感覺經常就是與log一起使用。
把題目做了下,ambition的代碼已經足夠了,貼出來分享:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n,m;
double g;
double h;
for(cin>>n;n>0;n--)
{
cin>>m;
g=m*log10((double)m);
[...]
文章來源:
http://www.wutianqi.com/?p=278
posted on 2010-07-05 23:17
Tanky Woo 閱讀(126)
評論(0) 編輯 收藏 引用