Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7317 - Цөөн квадрат

Өгөгдсөн тэгш өнцөгтийг хамгийн цөөн квадратадуудад хуваа.  

Input

2 бүхэл эерэг тоо зайгаар тусгаарлагдан өгөгдөнө.

Output

Мөр тус бүрт квадратын талын хэмжээ хэдэн ширхэг байгааг зайгаар тусгаарлан хэвлэнэ.

Example

Input 1:

11 4

Output:

3 1
1 3

 

4 2

3 1

1 3

 


Нэмсэн:Bataa
Огноо:2013-01-14
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2023-12-27 17:17:21
public class Think {
public static void main (String[] args) throws java.lang.Exception
{
Scanner in = new Scanner(System.in);
int a=in.nextInt();
int b=in.nextInt();
int c=0;
if(a>b){
c=a;
a=b;
b=c;
}

while(a!=0){ // 4!=0 true
System.out.println(a+ " "+b/a); // 4

c=a;
a=b%a;
b=c;
}
}
}
2023-11-27 08:06:44
#include<bits/stdc++.h>
using namespace std;
main(){
int a, b, n, d, c;
cin>>a>>b;
if(a>b){
c=a;
a=b;
b=c;
}
while(a!=0){
cout<<a<<" "<<b/a<<endl;
c=a;
a=b%a;
b=c;
}
}
ts
2023-11-15 10:39:24
#include<bits/stdc++.h>
using namespace std;
main(){
int a, b, n, d, c;
cin>>a>>b;
if(a>b){
c=a;
a=b;
b=c;
}
while(a!=0){
cout<<a<<" "<<b/a<<endl;
c=a;
a=b%a;
b=c;
}
}
2023-08-20 03:24:56
#include <iostream>
#include <algorithm>
using namespace std;
int n,m;
int main()
{
cin>>n>>m;
while(n>0)
{
if (n<m) swap(n,m);
cout<<m<<" "<<n/m<<endl;
n=n%m;
}
return 0;
}
2023-07-17 09:50:06
#include <iostream>
using namespace std;
int main() {
int a, b ;
cin >> a >> b ;
while (a > 0 ){
if ( a < b ) {
int d=a;
a=b ;
b=d;
}
cout << b << " " << (a/b) << endl ;
a=a%b;
}
return 0;
}
2023-05-18 15:26:07
Stop typing the answers
2023-03-15 05:11:11
GOY BODLOG
Бүхэл тооны квадрат
Цифрүүдийн нийлбэр нь n байх тоо бүхэл тооны квадрат болж чадах уу?

Input
n тоо өгөгдөнө. (1<=n<=2^63-1)

Output
Чадах бол YES үгүй бол NO гэж хэвлэ.

Example
Input:
564

Output:
NO
2023-03-15 03:35:34

d
d
d
dddd






ddd





































d




















d


























d



























d






















d

























d
































d






























d






























f

























fuck you pisda mini




































d



















f























































h





























2023-03-13 04:25:57
yamate kudasai olonlog exe
2023-01-16 10:59:42
tell meeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee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