Um, hi ... ? Basically we have a number N (N <= 10^5000000) represented by a string. Let say that |N] = the length of string N. Now I'm given an integer k (k <= 1e9). How do I confirm that N is divisible by k in O(|N|) ??
P/S : Notice that I want solution that works in O(|N|), not O(|N|log5000000). Anyone can help me ?








Thank for helping me out. Have a good day !!!
why does it work?
Think it as DP: if
then
Wow! That was impressive
just take pen + paper and try dividing 6541691484 by 4231. He did the same but with code
Wow. This little hint is easy enough to understand the code. Thank You!
where can I submit code for the same ??
A problem based on this concept: 490C
this is also a good one problem
This too
I used this function during the contest and it gave tle. can you share your sumbission that passed(didn't gave tle) using this function.
which problem
this .