Дамп всех задач
This commit is contained in:
12
olymp2017/2.py
Normal file
12
olymp2017/2.py
Normal file
@@ -0,0 +1,12 @@
|
||||
def Calc(a, b, op):
|
||||
dived = {
|
||||
1: a-b,
|
||||
2: a*b,
|
||||
3: a/b,
|
||||
}
|
||||
try:
|
||||
return dived[op]
|
||||
except KeyError:
|
||||
return a+b
|
||||
a, b, op = list(map(int, input().split()))
|
||||
print(Calc(a, b, op))
|
||||
Reference in New Issue
Block a user