Help with spoj problem

Revision ru1, by Biba_Boba, 2023-09-01 20:10:24

Please help with this spoj problem https://www.spoj.com/problems/CIRCLE_M/. I know that it can be solved using binary search, but numbers are very big, so I can't just use float. My python code gives TL — https://ideone.com/HGljSq. It seems that decimal library takes too much time, so does anyone know how to make it faster?

Tags spoj, python

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru1 Russian Biba_Boba 2023-09-01 20:10:24 353 Первая редакция (опубликовано)