summaryrefslogtreecommitdiff
path: root/introductory_problems/readme.md
diff options
context:
space:
mode:
authorJack Sangdahl <[email protected]>2025-02-13 15:11:28 -0700
committerJack Sangdahl <[email protected]>2025-02-13 15:11:28 -0700
commit19bb82f44e8da0ab854f93248a8fe72d430b46e4 (patch)
tree997771564cbee9ee34a1100c4d26019b40b20a2b /introductory_problems/readme.md
parent146f58d5d91133e43045df719b3f0ae7ad1266f0 (diff)
downloadcses-19bb82f44e8da0ab854f93248a8fe72d430b46e4.tar.gz
cses-19bb82f44e8da0ab854f93248a8fe72d430b46e4.zip
1617. bit strings
Diffstat (limited to 'introductory_problems/readme.md')
-rw-r--r--introductory_problems/readme.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/introductory_problems/readme.md b/introductory_problems/readme.md
index 9607312..0550440 100644
--- a/introductory_problems/readme.md
+++ b/introductory_problems/readme.md
@@ -55,3 +55,10 @@ Your task is to divide the numbers `1, 2, ..., n` into two sets of equal sum.
**Input**: The only input line contains an integer `n`. (Example: 7)
**Output**: Print "YES", if the division is possible, and "NO" otherwise. After this, print if the division is possible, print an example of how to create the sets.
+
+### Bit Strings
+Your task is to calculate the number of bit strings of length `n`. For example, if `n = 3`, the correct answer is 8, because the possible bit strings are `000`, `001`, `010`, `011`, `100`, `101`, `110`, and `111`.
+
+**Input**: The only input line has an integer `n`. (Example: 3)
+
+**Output**: Print the result modulo 10E9 + 7. (Example: 8)