백준
import sys
sys.stdin = open('input.txt')
input = sys.stdin.readline
n = input().rstrip()
def check(n):
if len(n) <= 1:
return int(n)
# 16진수
if n[0] == '0' and n[1] == 'x':
n = list(n)
now = -1
count = 0
result = 0
while n[now] != 'x':
if n[now] == 'a':
n[now] = 10
elif n[now] == 'b':
n[now] = 11
elif n[now] == 'c':
n[now] = 12
elif n[now] == 'd':
n[now] = 13
elif n[now] == 'e':
n[now] = 14
elif n[now] == 'f':
n[now] = 15
result += int(n[now]) * 16**count
now -= 1
count += 1
return result
# 8진수
elif n[0] == '0' and n[1] != 'x':
n = list(n)
now = -1
count = 0
result = 0
while now != -len(n):
result += int(n[now]) * 8**count
now -= 1
count += 1
return result
# 10진수
else:
return int(n)
print(check(n))
import sys
sys.stdin = open('input.txt')
input = sys.stdin.readline
n = int(input())
string = input().rstrip()
result = 0
stack = list()
for i in range(len(string)):
if string[i].isalpha() == True:
if stack and stack[-1].isalpha() == False:
if len(stack) > 6:
while len(stack) != 0:
stack.pop()
continue
result += int(''.join(stack))
# pop
while len(stack) != 0:
stack.pop()
else:
stack.append(string[i])
if stack and len(stack) <= 6:
result += int(''.join(stack))
print(result)
class Solution:
def isPalindrome(self, s: str) -> bool:
if s == " ":
return True
temp = list()
for string in s:
if string.isalnum():
temp.append(string)
return ''.join(temp).lower() == ''.join(temp[::-1]).lower()
하루를 마치고
초안 발표를 준비하면서 백엔드인 팀원들과 협업하려면 개념이라도 알아야 할 것들이 많다는 생각이 들었다. redis, nginx 등등 처음 들어보는 용어와 기술들이 많았다. 영상을 통해서 조금씩이라도 개념을 익혀놔야겠다.