10071 - Back to High School Physics

All about problems in Volume 100. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

Post by Dominik Michniewski »

use

Code: Select all

printf("%.0lf ... 
instead of

Code: Select all

printf("%Lf .... 
it should help ....
sanat
New poster
Posts: 1
Joined: Thu Jul 25, 2002 2:19 pm
Location: Bangladesh

Post by sanat »

Shohel, u r supposed to print a long int in output... as maximum output is 40000 or -40000.

why using float or double?

read the problem carefully....it's so easy...isn't it? :roll:

~Sanat
Eric3k
New poster
Posts: 29
Joined: Mon Apr 29, 2002 5:22 pm

Post by Eric3k »

Could any one explain me why the the answer is 2vt? From what I can see this would only be the case if the velocity was constant, but according to the problem, it has an acceleration, so the function d=vt no longer applies.
Thanks
Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

Post by Dominik Michniewski »

Read the question very carefully and answer surprize you :-)
Think about what query states ?? (Hint: how is formula of velocity in this kind of movement ?)

Best regards
Dominik
hujialie
New poster
Posts: 43
Joined: Thu Apr 17, 2003 10:24 am
Location: Shanghai,China

Post by hujialie »

To Eric3
because :
v=v0+a*t;
d=v0*(2*t)+1/2*a*(2*t)*(2*t)=2*v0*t+2*a*t*t=2*t*(v0+a*t).
==>
d=v*2*t.
shahriar_manzoor
System administrator & Problemsetter
Posts: 399
Joined: Sat Jan 12, 2002 2:00 am

Unhappy problemsetter

Post by shahriar_manzoor »

When I set this problem I did not consider it to become problem-solvers' sweetheart, but now I guess many have solved this problem without understanding it :( .

Ofcourse the method of hujialie is what I expected everyone to derive.
shamim
A great helper
Posts: 498
Joined: Mon Dec 30, 2002 10:10 am
Location: Bozeman, Montana, USA

Post by shamim »

When I set this problem I did not consider it to become problem-solvers' sweetheart, but now I guess many have solved this problem without understanding it .
Yes, it is true, i know many novice problem solver who had difficulty solving
problem 100, yet they somehow noticed that the answer to this problem is 2*a*b,
where a and b are the two inputs.
They have no idea on why the formula is 2*v*t. :(
Farid Ahmadov
Experienced poster
Posts: 131
Joined: Thu Apr 17, 2003 8:39 am
Location: Baku, Azerbaijan

Post by Farid Ahmadov »

Hi.
I don't think that it is a high school problem.
Where do we take formula 2*v*t from?

a - acceleration; v0 - initial speed; v - current speed; t1 - time; t2 - twice of t1; d - distance at time t2;

v = v0 + a*t1;
formula for distance : d = v0*t+(a*t^2)/2;
d = v0*t2 + (a*t2^2)/2 = v0*2*t1 + (a*4*t1^2)/2 = t1*(2*v0 + 2*a*t1) = 2*t1*(v0 + a*t1) = 2*t1*(v);

That is how we get 2*v*t.
I wrote it to help those who don't know it.

Good luck!
_____________
NO sigNature
UFP2161
A great helper
Posts: 277
Joined: Mon Jul 21, 2003 7:49 pm
Contact:

Post by UFP2161 »

Shouldn't the first line actually be:
A particle has initial velocity and CONSTANT acceleration.
Every physics problem that I've ever encountered delaing with that formula has the word constant in it. Yeah, I know I'm being anal and all, but without that one word, it shouldn't even be solvable =)
amd-RS
New poster
Posts: 27
Joined: Thu Sep 05, 2002 7:37 am

10071

Post by amd-RS »

Hello,

Is there a way to optimize this problem, it's very simple, but I get 0.094 sec.

Thanks, Aur
Jewel of DIU
New poster
Posts: 32
Joined: Thu Jul 31, 2003 6:21 am
Location: Daffodil Univ, Bangladesh
Contact:

Post by Jewel of DIU »

[c] Just print s*v*t*2 after take input. Directly print this,no pre calculate need[/c]
Hate WA
Visit phpBB!
keceman
New poster
Posts: 7
Joined: Wed Mar 03, 2004 6:51 am

10071 wa???1?

Post by keceman »

hi... i don't know why this give me WA...


/* @JUDGE_ID: 43238WF 10071 C++ */

#include <iostream.h>

void main()
{
long v=0, t=0;
cin >> v >> t;
cout << v*t*2 << endl;
}


thx a lot...
yatsen
Learning poster
Posts: 68
Joined: Fri Nov 23, 2001 2:00 am
Location: taiwan

Post by yatsen »

There are more than one test data.
So you should have a loop in your program.
keceman
New poster
Posts: 7
Joined: Wed Mar 03, 2004 6:51 am

Post by keceman »

hm... how do i use the loop? i've tried
while(1)
{
blablabla
}

and
while (!EOF)
{
blablabla
}

and still not work...... could u help me?? please... thx a lot...
yatsen
Learning poster
Posts: 68
Joined: Fri Nov 23, 2001 2:00 am
Location: taiwan

Post by yatsen »

I use C, not C++
The following is the code
[c]
while ( scanf("%d %d",&v,&t)==2 )
{
printf("%d\n",2*v*t);
}
[/c]
Post Reply

Return to “Volume 100 (10000-10099)”