描述
传送门:poj-2115
A Compiler Mystery: We are given a C-language style for loop of type
for(variable = A; variable != B; variable += C)
statement;Ie, a loop which starts by setting variable to value A and while variable is not equal to B, repeats statement followed by increasing the variable by C. We want to know how many times does the statement get executed for particular values of A, B and C, assuming that all arithmetics is calculated in a k-bit unsigned integer type (with values 0 <= x < $2^k$) modulo $2^k$.