标签:des style blog http os io for ar
2520 10 2520 20 0 0
Case #1: 2520 Case #2: 2600 题意:给你个x,k次操作,对于第i次操作是:要找个nx,使得nx是>=x的最小值,且能整除i,求k次操作后的数#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> typedef __int64 ll; using namespace std; ll x, k; int main() { int cas = 1; while (scanf("%I64d%I64d", &x, &k) != EOF && x+k) { ll tmp = x; for (ll i = 2; i <= k; i++) { tmp = tmp - tmp/i; if (tmp < i) break; } printf("Case #%d: %I64d\n", cas++, tmp*k); } return 0; }
HDU - 4952 Number Transformation,布布扣,bubuko.com
HDU - 4952 Number Transformation
标签:des style blog http os io for ar
原文地址:http://blog.csdn.net/u011345136/article/details/38562543