2747번 '피보나치 수'
123456789101112131415161718192021let input = Int(readLine()!)!var temp = 0var first = 1var second = 1var count = 2if(input == 1){ print("1")}else if(input == 2){ print("1")}else{ while(input != count){ temp = first + second first = second second = temp count += 1 } print(temp) }cs
Algorithm/Baekjoon Online Judge
2018. 2. 23. 09:41