| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:交G++结果WA的筒子注意了In Reply To:交G++结果WA的筒子注意了 Posted by:speedcell4 at 2012-09-27 11:08:14 > 用printf("%.2f")而不是printf(".2lf")
#include<iostream>
#include<cstdio>
using namespace std;
long long ans=1;
int main()
{
int n,k,tp;
cin>>k>>n;
tp=k;
while(n>0)
{
if((n&1)==1)
ans*=tp;
n>>=1;
tp*=tp;
}
cout<<ans<<endl;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator