更新 8,9 题
This commit is contained in:
parent
ba25d575d1
commit
a1ced46784
|
@ -0,0 +1,10 @@
|
||||||
|
from math import *
|
||||||
|
|
||||||
|
# x = input().split()
|
||||||
|
a = input()
|
||||||
|
for i in range(floor(len(a)/2)):
|
||||||
|
if(a[i]!=a[len(a)-i-1]):
|
||||||
|
print("False")
|
||||||
|
exit()
|
||||||
|
|
||||||
|
print("True")
|
|
@ -0,0 +1,5 @@
|
||||||
|
s = input()
|
||||||
|
if (s == s[::-1]):
|
||||||
|
print("True")
|
||||||
|
else:
|
||||||
|
print("False")
|
|
@ -0,0 +1,5 @@
|
||||||
|
x = list(map(int,input().split()))
|
||||||
|
x.sort()
|
||||||
|
a = x[0]
|
||||||
|
b = x[1]
|
||||||
|
print(round((a+b)*(b-a+1)/2))
|
Loading…
Reference in New Issue