UVA 550 (暑假-数论 -B - Multiplying by Rotation)
2014-07-22 08:42
232 查看
#include <iostream> using namespace std; int main() { int k, factor, num_1, num_0; while (cin>> k >> num_0 >> factor) { int count = 1; num_1 = num_0 * factor; while (num_1 != num_0) { count++; num_1 = num_1 % k * factor + num_1 / k; } cout<< count<< endl; } return 0; }
相关文章推荐
- uva 550 Multiplying by Rotation
- UVA - 550 Multiplying by Rotation
- UVA - 550 Multiplying by Rotation
- UVA550 Multiplying by Rotation
- uva 550——Multiplying by Rotation
- Uva 550 Multiplying by Rotation(模拟乘法)
- UVA 550 - Multiplying by Rotation
- UVA 550 Multiplying by Rotation (简单递推)
- UVa550 Multiplying by Rotation
- UVa 550 Multiplying by Rotation
- UVa 550 - Multiplying by Rotation
- UVa 550 Multiplying by Rotation (模拟乘法)
- Uva 550 - Multiplying by Rotation
- UVa 550 - Multiplying by Rotation
- UVa 550: Multiplying by Rotation
- UVA - 550 Multiplying by Rotation
- uva 550 Multiplying by Rotation(模拟)
- UVa 550 - Multiplying by Rotation
- UVa 550 - Multiplying by Rotation
- UVA 550 - Multiplying by Rotation