Commit 2b32572c by BellCodeEditor

auto save

parent 145fe74a
Showing with 56 additions and 2 deletions
import turtle
a=int(turtle.textinput("提示","输入大小:"))
turtle.color("red")
turtle.begin_fill()
turtle.left(45)
turtle.forward(2*a)
turtle.circle(a,180)
turtle.right(90)
turtle.circle(a,180)
turtle.forward(2*a)
turtle.end_fill()
turtle.bgcolor("black")
turtle.penup()
turtle.goto(100,-100)
turtle.write("你好!",font=("黑体",40,"bold"))
turtle.hideturtle()
turtle.done()
import random
a=input("输入拳:")
b=["石头","剪刀","布"]
computer=random.choice(b)
print(computer)
if a in b:
if a==computer:
print("平局")
elif a=="石头" and computer=="剪刀" or a=="剪刀" and computer=="布" \
or a=="布" and computer=="石头":
print("我胜了!")
else:
print("我输了!")
else:
print("输入错误!")
\ No newline at end of file
n,m=map(int,input().split())
wi=[-1]
vi=[-1]
for i in range(n):
a,b=map(int,input().split())
wi.append(a)
vi.append(b)
dp=[[0 for i in range(m+1)] for j in range(n+1)]
for i in range(1,n+1):
for j in range(1,m+1):
if j<wi[i]:
dp[i][j]=dp[i-1][j]
else:
dp[i][j]=max(dp[i-1][j],dp[i-1][j-wi[i]]+vi[i])
import tkinter
def login_to_reg(): # 登录界面转注册界面
pass
app_login.root.destroy()
global app_register
app_register=My_register()
app_register.show()
def reg_to_login(): # 注册界面转登录界面
pass
app_login.root.destroy()
global app_register
app_register=My_register()
app_register.show()
def register(): # 注册验证
pass
......
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