UVA-10879 Code Refactoring
来源:互联网 发布:墨客网络 编辑:程序博客网 时间:2024/06/08 16:29
2016-08-12
UVA - 10879 Code Refactoring
题目大意:找出一个数的任意两对因子。不一定要与样例相同。
解题思路:枚举能整除的输出两对,注意格式。
#include <iostream>#include <cstdio>using namespace std;int main() {int n, num;scanf("%d",&n);for (int i = 1; i <= n; i++) {int temp = 0;scanf("%d",&num);cout << "Case #" << i << ": " << num;for (int j = 2; j < num; j++) {if ( num % j == 0 ) {cout << " = " << j << " * " << num/j;if ( ++temp == 2 )break;}}cout << endl;}return 0;}
0 0
- UVa 10879 Code Refactoring
- uva 10879 Code Refactoring
- uva 10879 - Code Refactoring
- uva 10879 - Code Refactoring
- uva-10879 - Code Refactoring
- UVa 10879 - Code Refactoring
- uva 10879Code Refactoring
- UVa 10879 - Code Refactoring
- UVA 10879 Code Refactoring
- UVa 10879: Code Refactoring
- uva 10879 - Code Refactoring
- uva 10879 Code Refactoring
- UVa 10879 - Code Refactoring
- UVa 10879 - Code Refactoring
- Uva 10879 Code Refactoring
- UVA - 10879 Code Refactoring
- UVA - 10879 Code Refactoring
- UVA - 10879 Code Refactoring
- box-shadow投影
- HDU 1008 Elevator 水题
- 很高兴加入CSDN,与大家共同学习
- JavaSE自学笔记整理(七)
- android studio 修改项目名称
- UVA-10879 Code Refactoring
- HDU 5256 序列变换
- poj1201 Intervals
- PAT甲级练习题A1018. Public Bike Management (30)
- DIY智能插座(五) -- Android客户端
- javascript 学习笔记
- gensim做主题模型
- Could not resolve placeholder 'jdbc.url' in string value "${jdbc.url}"
- 有关全局变量的正确使用方法