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:极坐标与阿基米德螺线

Posted by sail6 at 2006-09-16 15:45:17 on Problem 2666
In Reply To:极坐标与阿基米德螺线 Posted by:huicpc39 at 2006-07-15 14:12:27
#include <stdio.h>
#include <math.h>
#define PI acos(-1)
int main(){
	int Speed,Angle,Dis;
	double Conver,Ang;
	double X,Y;
	while(scanf("%d%d%d",&Speed,&Angle,&Dis)){    
		if(Speed==0) break;
		Ang=(double)Angle;
		Conver=Ang/180;
		Conver*=PI;
		Conver/=sqrt(3.0);
		X=log((double)Dis);
		Y=X+Conver;
		X=exp(Y)-Dis;
		X/=Speed;
		if(X<=10000) printf("%d\n",(int)(0.5+X));
		else printf("God help me!\n");
	}
	return 1;
}

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