Qf&* ddlZddlZ ddlZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd Zy#e$rdZY-wxYw)Nc tjddi fd  fdtj5}tj|_tj |_tj|_d|jtj<|dkrd}| }nd}||j}|r| }ddd|S#1swYSxYw) Nc j|x}>|kr|z}n.|dz vr|dz x}|z}n|dz }|||z z}||<|SNget)wresulttw2BITLIMD2memw2pows ./opt/alt/python312/lib64/python3.12/_pylong.pyrzint_to_decimal..w2pow+s} ?ggaj F )F{QQ#"1q5z/!Q.!V rU1r6]2CF c|kr|S|dz }||z }|||zz }|||||z |zzSr) nr rhilorDinnerrs rrzint_to_decimal..inner>sW ;Q4K !V "W "(^R}uRR059<<.innerds{ 9q6M !V OOB  9"#R%2+ -A B1BRR 5R=#6#6r#:::rgyPD?rr-0)r'_decimalr.r*intlstrip)rr signsrr2s @@rint_to_decimal_stringr;WsI A7{x+>!$%% ;" A" "Q &'AK1u B a Ats{q HHSM !8OrcX difdfddtS)Nic j|x}<|krd|z}n,|dz vr |dz dz}n|dz }|||z z}||<|S)Nr-rr )r r rDIGLIMrw5pows rr?z _str_to_int_inner..w5powsx ggaj F )F{AQ#QUa!V rU1r6]2CF rc||z krt||S||zdzdz }||||||z z||z zzSr)r7)abmidr>rr:r?s rrz _str_to_int_inner..inners] q5F?q1v; 1uqyQS!}q#q3w!?QW MNNrrlen)r:r>rrr?s`@@@@r_str_to_int_innerrFs0@F C*O CF rcZ |jjdd}t|S)N_r4)rstripreplacerF)r:s rint_from_stringrKs,4  3#A Q rc tjd|}|s tdt|j d}|j ddk(r| }|S)Nz\s*([+-]?)([0-9_]+)\s*z&invalid literal for int() with base 10rrr3)rematch ValueErrorrKgroup)r:mvs r str_to_intrSsSL *A.A ABB #AwwqzS B Hric0 |j|z tkr t||S|dz}|r|dz}|dz}|dz }|dz }d|zdz }||z ||z}}t||z ||z |z||||\}} t| ||z||||\} } |r| dz} ||z| z| fSr)r' _DIV_LIMITr/_div3n2n) rArBrpadhalf_nmaskb1b2q1rq2s r_div2n1nr_s  ||~Z'a| a%C  a a Q !VF K1 D &[!d(B Q!Va6kT11b"f EEB QD!RV 4EB  a <" a rc ||z |k(rd|zdz |||zz |z}}nt|||\}}||z|z||zz }|dkr|dz}||z }|dkr||fS)Nrr)r_)a12a3rBrZr[rqr]s rrVrVsK ax2~Q!|SB!G_r11R#1 a"BA a% Q Q a% a4Krc dg|jzdz zzfd|r|dtS)Nrrc|dz|k(r||<y||zdz }||z z}||z }|||zz }||||||yrr) xLRrCshiftupperlowera_digitsrrs rrz_int2digits..inner sc q5A:HQK 1ulqA U Ue^$ eQ eS!r)r'rE)rArrlrs `@@r _int2digitsrmsJ sq||~)A-!34H   aCM" OrcD fdrdtSdS)Ncj|dz|k(r|S||zdz }||z z}|||z||zSrr)rgrhrCridigitsrrs rrz_digits2int..inner!sN q5A:!9 1ulqA c1 &%3-77rrrD)rprrs``@r _digits2intrqs'8%+5CK 11rc |j}t||}d}g}t|D])}t||z|z||\}}|j |+|j t ||}||fSNr)r'rmreversedr_appendreverserq) rArBrrlr]q_digitsa_digitq_digitrcs r _divmod_posrz+s A1a H AHH%qAv0!Q7  & Ha A a4Krc |dk(rt|dkrt| | \}}|| fS|dkrt||\}}|||zfSt||Srs)ZeroDivisionError int_divmodrz)rArBrcr]s rr}r}<st Av Q1"qb!11"u Q1"a 1r1r6z1a  r)rMrr6 ImportErrorr*r;rFrKrSrUr_rVrmrqrzr}rrrrsr >  =@*Z,^   "  < > 2" !S Hs 3==