Code&Data Insights

BaekJoon Algorithm - Stage 8 [10757, 2775 ] ( Python 3 ) 본문

Algorithm/BaekJoon Online Judge

BaekJoon Algorithm - Stage 8 [10757, 2775 ] ( Python 3 )

paka_corn 2022. 1. 27. 03:16

 

2022.01.26

 

 

 

# Stage 8 - [10757]

 

[ 10757 ] - 큰 수 A +B 

 

[ my code  ]

 

a, b = map(int, input().split())

def add(a,b):
    return a+b

print(add(a,b))
        

 

 

 

 

 

 

 

# Stage 8 - [2775]

 

[ 2775 ] - 부녀회장이 될테야

 

 

[ my code ]

 

 

 

-----> 이런식으로 0층에 i호에는 i명이 살고 0층만 factorial 그 이후에는

1호를 제외한 그후의 호수의 명수를 더해서 출력된다. 

 

 

 

 

 

[ my code - First Attempt ]

 

이렇게 하니 출력초과가 나왔다. 

 


        

 

[ my code - Second Attempt ]

 

 

--> 마지막에  [-1]을 안해줘서 출력초과가 난것 같다. 

 

 

 

 

 

 

 

 

Comments