projects
/
cses-programming-tasks.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Tackled problem 1625
[cses-programming-tasks.git]
/
app
/
cses1617.hs
1
main :: IO ()
2
main = do
3
line1 <- getLine
4
let n = read line1
5
let solution = solve n 1
6
print solution
7
8
limit = 10 ^ 9 + 7
9
10
solve :: Int -> Int -> Int
11
solve 0 t = t
12
solve n t = solve (n - 1) ((t * 2) `mod` limit)
13
14