
https://tiplanet.org/triconcours.php
def setst(k,v):
global st
st[k]=v
def setll(k,v):
global ll
ll[k]=v
def setls(k,v):
global ls
ls[k]=v
def setcode(v):
global code
code=v
def pot(k,v=1,d=True):
if k>=0 and k<st[1]:
v=f2mf(max(min(v,1),0))
setst(2,st[2]+v-ls[k])
for l in range(st[0]):
if bitand(sla[l],2**k):
ol=ll[l]
setll(l,ll[l]+v-ls[k])
setst(3,st[3]+((f2mf(1)<=ll[l]<=f2mf(2)) and ((ol<f2mf(1)) or (ol>f2mf(2))))-(((ll[l]<f2mf(1)) or (ll[l]>f2mf(2))) and (f2mf(1)<=ol<=f2mf(2))))
setst(4,st[4]+max(ll[l]-f2mf(1),0)-max(ol-f2mf(1),0))
setst(5,st[5]+ll[l]*(ll[l]<f2mf(1))-ol*(ol<f2mf(1)))
setst(6,st[6]+((f2mf(2)<ll[l]) and (ol<=f2mf(2)))-((ll[l]<=f2mf(2)) and (ol>f2mf(2))))
setls(k,v)
s=float(st[3]-mf2f(st[2]+st[6]/2+st[4]/5+st[5]/10))
c=smf(ls)
setcode(c)
ss=pst(s,d)
if d:
print("Code info@tiplanet.org (var CAS 'code') :")
print(c+" ")
return {c,s}
def pot(k,v=1,d=True):
global ll,ls,st,code
if k>=0 and k<st[1]:
v=f2mf(max(min(v,1),0))
st[2]=st[2]+v-ls[k]
for l in range(st[0]):
if bitand(sla[l],2**k):
ol=ll[l]
ll[l]=ll[l]+v-ls[k]
st[3]=st[3]+((f2mf(1)<=ll[l]<=f2mf(2)) and ((ol<f2mf(1)) or (ol>f2mf(2))))-(((ll[l]<f2mf(1)) or (ll[l]>f2mf(2))) and (f2mf(1)<=ol<=f2mf(2)))
st[4]=st[4]+max(ll[l]-f2mf(1),0)-max(ol-f2mf(1),0)
st[5]=st[5]+ll[l]*(ll[l]<f2mf(1))-ol*(ol<f2mf(1))
st[6]=st[6]+((f2mf(2)<ll[l]) and (ol<=f2mf(2)))-((ll[l]<=f2mf(2)) and (ol>f2mf(2))))
ls[k]=v
s=float(st[3]-mf2f(st[2]+st[6]/2+st[4]/5+st[5]/10))
c=smf(ls)
code=c
ss=pst(s,d)
if d:
print("Code info@tiplanet.org (var CAS 'code') :")
print(c+" ")
return {c,s}
ggauny@live.fr wrote:@M Critor, cet écran est-il normal ??? Que viennent faire ces fonctionsdans votre application ?
Users browsing this forum: ClaudeBot [spider] and 73 guests