1uva10879(数论)
来源:互联网 发布:什么是淘宝同步单 编辑:程序博客网 时间:2024/06/15 22:11
10879 - Code Refactoring
Time limit: 3.000 seconds
Code Refactoring
Time Limit: 2 seconds
broken. Break the code, solve the crime."Agent Cooper
Several algorithms in modern cryptography are based on the factthat factoring large numbers is difficult. Alicia and Bobby knowthis, so they have decided to design their own encryption schemebased on factoring. Their algorithm depends on a secret code,K, that Alicia sends to Bobby before sending him anencrypted message. After listening carefully to Alicia'sdescription, Yvette says, "But if I can intercept K andfactor it into two positive integers, A and B, Iwould break your encryption scheme! And the K values you useare at most 10,000,000. Hey, this is so easy; I can even factor ittwice, into two different pairs of integers!"
Input
The first line of input gives the number of cases, N (atmost 25000). N test cases follow. Each one contains thecode, K, on a line by itself.
Output
For each test case, output one line containing "Case #x:K = A * B = C * D", whereA, B, C and D are different positiveintegers larger than 1. A solution will always exist.
312021010000000
Case #1: 120 = 12 * 10 = 6 * 20Case #2: 210 = 7 * 30 = 70 * 3Case #3: 10000000 = 10 * 1000000 = 100 * 100000
Problemsetter: Igor Naverniouk
题意:把一个数拆分成不同的两组分别由两个数相乘。
简单题:1Y。
思路:直接枚举就是了。。
#include <iostream>
#include<cstdio>
#include<cstring>
using namespace std;
const int maxn =10;
int a[maxn];
int main()
{
}
- 1uva10879(数论)
- UVA10879
- uva10879
- UVA10879 (暑假-数论 -H - Code Refactoring)
- UVA10879代码重构
- UVa10879 Code Refactoring
- [转]数论知识(1)
- 数论模板1
- 数论总结1
- 数论证明题(1)
- 1uva10392(数论)
- 1uva408(数论)
- 数论总结1
- 初等数论1
- 数论总结(1)
- 数论(1)
- 低等数论1
- 数论总结1
- uva10110(数论)
- uva575(数论)
- uva568(数论)
- uva350(数论)
- 1uva10392(数论)
- 1uva10879(数论)
- 1uva10250(几何计算)
- Hadoop Mapreduce 2.0 Yarn
- java中实现汉字转拼音
- 简单的轮播效果
- STL删除list元素
- qt 富文本 打印
- libevent源码深度剖析三
- 【Git】Ubuntu12.04下安装git,SSH及出现的Permission denied解决办法