Home > other >  Please take a look at
Please take a look at

Time:09-17

Python

CodePudding user response:

 
The tree=98
Day=0
S=0
While s<98:
Day +=1
S +=10
If s>=98:
Break
S -=7.8
Print (s, day

Day=s=0
Bott=int (input (' drinks'))
S=bott
While bott>=3:
S +=int (bott/3)
Bott=bott % 3 + int (bott/3)
Print (s)



CodePudding user response:

 
The import time
,0,0,0,0,0 timexs=[10] # newx time, time of x, y, in half an hour to 1
Timeys=,0,0,0 [90]
Print (sum (timexs))
Newxs=[10]
Eats=[0, 0]
For _ in range (1, int (60/0.5) + 1, 1) :
For I in range (0, 4) :
If timeys [I]!=0:
# print (I, timeys [I], newxs [1])
Try:
Timeys [I]=timeys [I] - newxs [0]
Timeys [I]=timeys [I] - eats [1]
Except the Exception as e:
# print (I, timeys [I], newxs [1])
Raise e

Newxs. Insert (0, newxs. Pop ())
Eats. Insert (0, eats. Pop ())
Eats [0]=eats newxs [0] + [0]
Newxs [0]=timexs [1]
Timexs [1]=timexs [1] * 2
Timexs. Insert (0, timexs. Pop ())
Timeys [1]=timeys [1] * 2
Timeys. Insert (0, timeys. Pop ())
Print (' {} hour X number distribution: {} Y quantity distribution: new born X: {} {} is born every X 1 hours {} '. The format (_ * 0.5, timexs timeys, newxs, eats))
# time. Sleep (1)
Print (sum (timeys))

  • Related