LoginSignup
1
1

More than 1 year has passed since last update.

AtCoder Python 解答通りなのにTLE

Posted at

回答通りのコードなのに、、、

PythonでとあるC問題に挑戦していました。
しかし、実行しても
「TLE」
の結果が返ってくる、、

あきらめて解答を見てみたら、
合ってるやん!!

まさかこんなに早い段階でPythonの限界が、、!?

対策

言語をPyPy3で実行する
image.png

PyPyはJITコンパイル機能があり、Pythonのコードを高速に実行できる言語です。ほぼほぼPythonのコードでもコンパイルしてくれます。

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1