No.350 d=vt
タグ : / 解いたユーザー数 456
作問者 :
nmnmnmnmnmnmnm
Problem Statement
An object moves at constant velocity in one direction.
Given the velocity (m/s) to 4 decimal places and the time (s) as an integer, find the distance traveled (m), rounded down to an integer (truncating the fractional part).
It is guaranteed that the velocity is greater than 0m/s and less than 1m/s.
The velocity is always displayed to exactly 4 decimal places; digits from the 5th decimal place onward are not displayed, and they are all assumed to be 0.
The time is guaranteed to be a positive integer.
Input
$v$ $t$
$v$ represents the velocity (m/s). It is always displayed to 4 decimal places. $0.0000<v<1.0000$.
$t$ represents the time (s). The time is always a positive integer. $1 \le t \le 10000=10^4$.
Output
Output the distance traveled (m), with the fractional part truncated, on a single line.
Print a newline at the end.
Sample
Sample 1
Input
0.5000 8
Output
4
Moving at a velocity of 0.5m/s, the object has traveled 4m after 8 seconds.
Sample 2
Input
0.0123 45
Output
0
The fractional part of the answer is truncated, so the answer is 0m.
Sample 3
Input
0.2820 7000
Output
1974
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。