Commit 0905ebac by BellCodeEditor

save project

parent 8d55a7c0
Showing with 9 additions and 8 deletions
...@@ -9,11 +9,12 @@ ...@@ -9,11 +9,12 @@
# else: # else:
# print("没有此商品") # print("没有此商品")
name = {'小美':99} name = {'小美':99}
a = input() while True:
b = int(input()) a = input()
if a in name: b = int(input())
if b > name[a]: if a in name:
if b > name[a]:
name[a] = b
else:
name[a] = b name[a] = b
else: print(name)
name[a] = b \ No newline at end of file
print(name)
\ 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