2520 10 2520 20 0 0
Case #1: 2520 Case #2: 2600找规律= =#include <stdio.h> int main() { __int64 a,b,cas=1,i,j; while(~scanf("%I64d%I64d",&a,&b),a+b) { i=2; while(i<=b) { if(a%i) { j=a/i+1; if(j<=i) { a=j*b; break; } a=i*j; } else { j=a/i; if(j<=i) { a=j*b; break; } } i++; } printf("Case #%I64d: %I64d\n",cas++,a); } return 0; }
HDU4952:Number Transformation,布布扣,bubuko.com
原文:http://blog.csdn.net/libin56842/article/details/38583945