Commit 21de975c by BellCodeEditor

save project

parent 3d7f5f18
Showing with 23 additions and 0 deletions
num=0
for cock in range(1,21):
num=0
for cock in range(1,21):
for hen in range (1,34):
for chicken in range (1,101):
if cock + hen + chicken ==100 and cock*5+hen*3+chicken/3==100:
num=num+1
print(f'第{num}种方案是:公鸡{cock}只,母鸡{hen}只,小鸡{chicken}只')
\ No newline at end of file
for a in range (0,10):
for b in range (0,10):
for c in range (0,10):
for d in range (0,10):
if int(str(8)+str(a)+str(b)+str(c)+str(d))+int(str(a)+str(b)+str(c)+str(d)+str(6))==121410:
print(a,b,c,d)
import csv
with open('/data/subways.csv') as f:
rows = list(csv.reader(f))
for row in rows[1:]:
if(int(row[1])>=120):
print(row[0])
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment