20250603 baekjoon python

This commit is contained in:
songyc debian 2025-06-03 17:21:22 +09:00
parent 520a078dcd
commit 7f7d94d3f1
5 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,2 @@
s = input()
print('1' if s==s[::-1] else '0')

View File

@ -0,0 +1,11 @@
s = input().upper()
dic = {}
for ch in s:
dic[ch] = dic.get(ch,0) + 1
m = max(dic.values())
res = [k for k, v in dic.items() if v==m]
print(res[0] if len(res)==1 else '?')

View File

@ -0,0 +1,5 @@
n = int(input())
for i in range(n):
print(' '*(n-i-1)+'*'*(2*i+1))
for i in range(1,n):
print(' '*i+'*'*(2*n-(2*i+1)))

View File

@ -0,0 +1,6 @@
print(" ,r\'\"7")
print("r`-_ ,\' ,/")
print(" \\. \". L_r\'")
print(" `~\\/")
print(" |")
print(" |")

View File

@ -0,0 +1,3 @@
n = list(map(int, input().split()))
m = [1, 1, 2, 2, 2, 8]
print(*list(m[i]-n[i] for i in range(6)))