TIL/Algorithm
2019. 8. 12.
[Algorithm] Hackerrank - Repeated String
문제: Lilah has a string, s, of lowercase English letters that she repeated infinitely many times. Given an integer, n, find and print the number of letter a's in the first letters of Lilah's infinite string. For example, if the string s = 'abcac' and n = 10, the substring we consider is abcacabcac, the first 10 characters of her infinite string. There are 4 occurrences of 'a' in the substring. Fu..