Created
August 18, 2021 00:16
-
-
Save koogawa/4a2de9795dc0a045dfe066fd47b867cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let input = readLine()!.split(separator:" ").map { Int(String($0))! } | |
var (N, X, Y) = (input[0], input[1], input[2]) | |
var ans = 0 | |
for _ in 2..<N { | |
ans = (X + Y) % 100 | |
X = Y | |
Y = ans | |
} | |
print(ans) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment