1 solutions
-
0
C++ :
#include<iostream> #include<stdio.h> #include<cmath> using namespace std; double h,s,v,l,k,n; int answer=0; int main() { cin>>h>>s>>v>>l>>k>>n; double t,y,y2; t=sqrt(0.2*(h-k)); y=s-v*t; y2=y+l; t=sqrt(0.2*(h)); y=s-v*t; for (int i=0;i<n;i++) { if (i>=y-0.00001&&i<=y2+0.00001) { answer++; } } printf("%d",answer); return 0; }
- 1
Information
- ID
- 17909
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By