MAGIC - Magic Program

no tags 

Here is a magic program (in C++).

#include <cstdio>
int main(){
    unsigned seed=A;
    for(int i=0;i<10000;i++)
        printf("%u\n",seed=(seed*B+i)%C);
    return 0;
}

A,B,C are three magic numbers in range [1,65536).

Now you are given the output of the program. You should submit a program to print the output.


hide comments
Jay H. Bosamiya: 2013-03-16 13:38:07

i don't really understand the question... Do we find A,B,C and replace in the given program and then submit?

robot: 2011-07-17 03:58:57

interesting, brute forth though ;-)


Added by:Bin Jin
Date:2008-02-17
Time limit:1s
Source limit:200B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: CPP
Resource:own problem