[old] Achilles and the Tortoise

[old] Achilles and the Tortoise

Undefined
EN ES 日本語 RU

競争において最速の走者でさえ最遅の走者を永遠に追い越せない。 なぜなら追いかけ始めてそこに至る頃には ...

A1は T2よりも速い。だから T2はX秒だけ A1より先にスタートする。 X 秒の間に T2は t2_speed*X メートル進む。 つまり A1は T2がいた場所に到達したころには T2は既に次の地点に移動しており、それは次の試みでも同様の結果となる。これが 無限(infinity)に続く。 このパラドックスは理論上は正しい。 しかし実際には A1は容易に T2を追い越す。うむ…我々は A1が T2に追いつく瞬間を計算できるかもしれない。

A1-T2

あなたには A1と T2の速度(メートル/秒)と同じ形式(integer型)で T2のアドバンテージが秒数で与えられる。 A1と T2が横並びになるまでの時間を計測しよう。(T2のスタート時点から計測する) 解答は小数点以下8桁の精度(with precious±10-8)の秒数で表すこと。

入力: 引数は3つ。A1とT2の速度とT2のアドバンテージ。(integer型)

出力: A1がT2に追いつくまでの時間(T2のスタート時点から計測する) (integer型またはfloat型)

例:

chase(6, 3, 2) == 4
chase(10, 1, 10) == 11.11111111

どのように使われるか: 学生時代に戻って学校で学んだ数学の基礎を思い出そう。 しばしば簡単な算数で複雑なパラドックスを容易に解けることがある。

事前条件:
t2_speed < a1_speed < 343
0 < advantage ≤ 60

You should be an authorized user in order to see the full description and start solving this mission.
Settings
Code:
Other:
Invalid hot key. Each hot key should be unique and valid
Hot keys:
CheckiO Extensions

CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.

In order to install CheckiO client you'll need installed Python (version at least 3.8)

Install CheckiO Client first:

pip3 install checkio_client

Configure your tool

checkio --domain=js config --key=

Sync solutions into your local folder

checkio sync

(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)

checkio serv -d

Alternatevly, you can install Chrome extension or FF addon

checkio install-plugin
checkio install-plugin --ff
checkio install-plugin --chromium

Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.

Pair Programming (Beta-version)

Welcome to Pair Programming! Engage in real-time collaboration on coding projects by starting a session and sharing the provided unique URL with friends or colleagues. This feature is perfect for joint project development, debugging, or learning new skills together. Simply click 'Start Session' to begin your collaborative coding journey!

Waiting for Pair Programming to start...

You are trying to join a pair programming session that has not started yet.

Please wait for the session creator to join.

Waiting for Pair Programming to reconnect...

It looks like the creator of the pair programming session closed the editor window.

It might happen accidentally, so that you can wait for reconnection.

×
 
 
<< <
> >>
exec show

Whats Next?

Free accounts will see Best CheckiO solutions with some delay.
Best Solutions will be opened in a moment
Become Awesome and Don't wait
The next stage is ""
Will be activated in
View More Solutions Random Review Solutions Go to the next mission