Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:交G++结果WA的筒子注意了

Posted by touhao1234 at 2014-07-30 15:42:44 on Problem 1151
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator