from math import * # 输入的第一个数代表要选择的操作,后两个数代表要计算的数x,y。第1个数为1表示加,为2表示减,为3表示乘,为4表示除,为5表示求余数,为6表示乘方(x的y次方),为7表示开方(x的y次开方),为8表示求对数(x以y为底的对数)。x,y都为整数,结果保留两位小数 a, x, y = map(int, input().split()) if (a == 1): print("{:.2f}".format(x + y)) elif (a == 2): print("{:.2f}".format(x - y)) elif (a == 3): print("{:.2f}".format(x * y)) elif (a == 4): print("{:.2f}".format(x / y)) elif (a == 5): print("{:.2f}".format(x % y)) elif (a == 6): print("{:.2f}".format(x**y)) elif (a == 7): print("{:.2f}".format(x**(1 / y))) elif (a == 8): print("{:.2f}".format(log(x) / log(y)))