您的位置:首页 > 其它

UVa 10879 Code Refactoring

2010-03-05 18:36 369 查看
/*
coder: ACboy
date: 2010-3-5
result: AC
description: UVa 10879 Code Refactoring
*/

#include <iostream>
using namespace std;

int ans[5];

int main()
{
int n;
int count = 0;
#ifndef ONLINE_JUDGE
freopen("10879.txt", "r", stdin);
#endif
cin >> n;

while (n--)
{
int c = 0;
int input;
cin >> input;
for (int i = 2; ; i++) {
if (input % i == 0) {
ans[c++] = i;
ans[c++] = input / i;
}
if (c == 4) break;
}
printf("Case #%d: %d = %d * %d = %d * %d/n", ++count, input, ans[0], ans[1], ans[2], ans[3]);
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  refactoring input c 2010