F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Square Number

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 748    Accepted Submission(s): 290


Problem Description
Find the biggest integer n (1 <= n <= N) and an integer x to make them satisfy
 

Input
The input consists of several test cases. Each test case contains a integer N, 1<=N<=10^18.The input ends with N = 0.
 

Output
In one line for each case, output two integers n and x you have found.
 

Sample Input
1 2 0
 

Sample Output
1 1 1 1
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 08:41:19, Gzip enabled