蓝桥杯算法提高VIP-剪刀石头布-题解(Python代码)打表打表
摘要:直接Python打表玩
考虑每一种情况,直接用一个字典解决
```python
import math
ans={
"0 0":0,
"1 1":0,
"2 2"……
蓝桥杯算法提高VIP-剪刀石头布-题解(Python代码)
摘要:参考代码:a,b = map(int,input().split())
def judge(a,b):
if a==b:
return 0
if (a==0 a……
优质题解
编写题解 1481: 蓝桥杯算法提高VIP-剪刀石头布,结果的输出使用枚举类型解题
摘要:###### **题目要求:**
要求:选择结构中使用枚举类型,结果的输出也使用枚举类型表示。
题目明确要用枚举的方式解题,对于输出,这个题解已经通过了,但是选择结构中怎么去使用枚举类型解题我……
石头剪刀布python程序写法
摘要:解题思路:a,b=map(int,input().split())if a==b: print("0")elif a>b: if a==2 and b==0: print("……
1481: 蓝桥杯算法提高VIP-剪刀石头布 python
摘要:解题思路:基础if else语句注意事项:无参考代码:list1 = list(map(int,input().split()))
if list1[0] == 0:
if list1[1……
编写题解 1481: 蓝桥杯算法提高VIP-剪刀石头布
摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split())if (a==0 and b==2) or (a==1 and b==0) or (a==2 and b==1):……
1481: 蓝桥杯算法提高VIP-剪刀石头布(python)
摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split())if a == b: print("0")elif (a == 0 and b == 2) or (a ==……
1481: 蓝桥杯算法提高VIP-剪刀石头布(python解)
摘要:解题思路:题中要求枚举类型表示先输入a b代表两人出拳 然后分支嵌套判断a出石头、剪刀、布三种情况的时候b出的什么,进行输出注意事项:注意缩进参考代码:while True: a,b= map(……
题解 1481: 蓝桥杯算法提高VIP-剪刀石头布
摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split())sum=str(a)+str(b)s=int(sum)str1=[2,21,10]str2=[20,12,1]st……