水题 A Simple Task
2013-09-11 14:03
260 查看
A Simple Task
Time Limit : 2000/1000ms(Java/Other) MemoryLimit : 65536/32768K (Java/Other)Total Submission(s) :18 AcceptedSubmission(s) : 11Font: Times NewRoman | Verdana | Georgia
Font Size: ← →
Problem Description
Given a positive integer n and the odd integer o and thenonnegative integer p such that n = o2^p.ExampleFor n = 24, o = 3 and p = 3.TaskWrite a program which for each data set:reads a positive integer n,computes the odd integer o and the nonnegative integer p such thatn = o2^p,writes the result.Input
The first line of the input contains exactly one positive integer dequal to the number of data sets, 1 <= d<= 10. The data sets follow.Each data set consists of exactly one line containing exactly oneinteger n, 1 <= n <=10^6.Output
The output should consists of exactly d lines, one line for eachdata set.Line i, 1 <= i <= d, corresponds tothe i-th input and should contain two integers o and p separated bya single space such that n = o2^p.Sample Input
1
24
Sample Output
3 3
相关文章推荐
- HDU 1339 A Simple Task
- ACM: 水题 分数运算 poj 3979
- hdu 1497 Simple Library Manageme…
- POJ 1083 Moving Tables(水题)
- Collada DOM 的使用--CreateSimple…
- Writing a Simple …
- A simple puzzle game
- Simple&nbsp;guide&nbsp;for&nbsp;Automake/Autoco…
- WDA: A Simple Test of ALV
- ACM: 一道水题 poj1723
- WDA: A simple tes…
- 更新段&nbsp;POJ-3468-A&nbsp;Simple&nbsp;Problem…
- POJ 3094 Quicksum(水题) 涉及到字…
- Java timer timertask用法(转)
- SimpleDateFormat 类
- POJ 1003 Hangover(水题) 权当复习…
- simple&nbsp;kmeans.m
- Simple&nbsp;test&nbsp;to&nbsp;hide&nbsp;Information&nbsp;…
- Simple&nbsp;test&nbsp;to&nbsp;hide&nbsp;Information&nbsp;…
- ZZULI 1596 Assign the task(暴力…