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.|

RGB7315 - Бутархайг хураа

Өгөгдсөн энгийн бутархайг хураа.

Input

Энгийн бутархайн хүртвэр, хуваарийг натурал хоёр тоо нэг зайгаар тусгаарлагдан өгөгдөнө.

Output

Хураагдсан бутархайн хүртвэр, хуваарь нь дараах хэлбэртэйгээр хэвлэгдэнэ.

хүртвэр/хуваарь

Example

Input:
9 15

Output:
3/5

Нэмсэн:Bataa
Огноо:2013-01-11
Хугацааны хязгаарлалт: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
2024-11-20 03:48:02
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,n,m;
cin>>a>>b;
n=a;
m=b;
while (a!=b)
{
if (a>b)
a=a-b;
else
b=b-a;
}
cout<<n/a<<"/"<<m/a<<endl;

return 0;
} huul duu nar
2024-11-19 11:04:21
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,n,m;
cin>>a>>b;
n=a;
m=b;
while (a!=b)
{
if (a>b)
a=a-b;
else
b=b-a;
}
cout<<n/a<<"/"<<m/a<<endl;

return 0;
} teg
2024-08-08 06:24:14
pisda bainu

2024-05-22 04:08:52
zl golog mn
2024-05-20 04:04:36
fuck u
2024-04-08 05:11:04
+*###%%%%%%%#*: ...-+++=: -+************##**+++***********-
.+*##%%%%%%%%%%%%%#+: .-===+++++*++=+*+++**********#**++************-
=*##%%%%%%%%%%%%%%%%%#++=-::.. .-++++++++++++*++++++++********##***************-
.+#%%%%%%###%%%%%%%%%%%%##*+++==-. .+*****+++++++++**++++++*********##**************-
.=#%%%%%%%###%%%%%%%%%%%%%####*#*+----. .*######***++++++++*+++++++*******##**************-
.*%%%%%%%%#%%%%%%%%%%%%%%#*###***++------.. =#######%%#*++++++++**+++++********##*************-
-#%%%%##%##%%%%%%%%%#*+===-----------==----:-*%#%####%#%##++++++++***++++*******###************-
=#%%%%##%%##%%%%%%%#+=--::::::::::::::::-----=*%%%%%%%%#####*+++++++***++++*******###***********-
=#%%%%##%%########*+--:::::::.::::::::::::::----+*#%%%%%%####***++++++****+++******###***********-
=#%%%%##%%%###***+=--::--:::::...........::::::::--=+#%%%%%##*****+++++*+***++*******###**********-
=#%%%%##%%%##*+=--:::::--:::::..............:::::::::-=+#%%%##****-.=+++++++**+********%##*********-
-#%%%%%#%%%##*=-:::::::--:::::::.............::::::::::-=+********+===++++++++**********%##*********-
.*%#%%###%%#*+-::::::::--::::::::...............:::::::::--=**+===------==+++++**********####********-
=###%###%###+-::....:::--:::.::-:.....................:::::-+**=---::::::-=++++*+*********%###*******-
.#######%%##+-::.......:-:....:-*:.......................::::-=**=-:::::::::-=++++*********####*******-
.+######%%%#*-::........:-:.....=+-........................::::-+**--:::::::::-+++++*********%###******-
-####%##%%#*=::.........:-:....:+::..........................::-=+*+-::::....::-++++*********####******-
:**###%##%##+-:..........:-:....:**-...........................::-=**=-::::.....:-**++********#####*****-
=#*###%%%##*-:...........:-:....:##=............................::=+*+=::::......::*+++*******#####*****-
.*##%%#%%%##+:............:-:....:##=.............................:-++++-:::......::-+++++*****#####*****-
-*##%%%%#%#*-:............:-:.....+-:..............................:=+++=::::......::-++++**+**#####*****-
=*##%%%%%%#+:..............::.....:::....................:.........:-+++=-::::.....:::-+++*****#####*****-
=###%%%%%%*-:..............::..................:........:-.........:-++++-:::::....::::=++******###******-
=#%#%%%%%#*-.................................:::::.....:--:........::=+++=-:::::...:::::=+******#*##*****-
-#%%%%%%%#+:................................:..:::....:-=::.........:=+++=-:::::...::::::++*+***####*****-
.*#%%%%%%#=:...................................+::....-==:::........:=+=+=-:::::...::::::-+******#####**#-
:*%%%%%%##=:..................................:+::...:-==:::........:=+=+=-::::::..:::::::=*****######***-
.+###%%%%#*=:..................................:::.....-==::-........:-+++=-::::::...:::::::+****#####****-
-#%%%%%%%#+=:..................................:::.....-==::-........:=++==--::::::.:::::::.-****##*##****-
+##%%%%%%#*=::.................................:=:.....-==:::........:=+===--::::::.:::::::..=***##*##****-
*#%%%%####*-::.................................:*::....-==:::........:=+==--:::::::.:::::::..-+*####******-
*#%%%%%%##*-::..............................::..:::....:-=:::........:+++=---::::::::::::::::+**###*******-
*#%%%%%%%%#=:::..............................::::-:.....:=::........:-++==--:::::::::::::::.=+**###*******-
+#%%%%%%%%#+-:::...............................:::......:=-.........:-++==--::::::::::::::.-+***####******-
=##%%%%%%%%*-:::...........::......::....................:-........::-++==--:::::::::::::::+***#####******-
-*#%#%%%%%%#=:::..........:::.....:::...............................:=++==--::::::::::::::++***#%##*******-
.*##%%%%%%%%*=-::.........:::.....*#=:.............................::=++==--:::::::::::::=+****#####******-
.*##%%%%%%%%#*=-::........:::.....##+:.............................:-+++=--:::::::::::::=+*****####*******-
.+*#%#%%%%%%%#+=-::.......:::....:*#=:...........................::-=+++=--::::::::::::=+*****#####*******-
-*#%#%%%%%%%%#*=-::......:::....:+-:..........................::::-=++==--:::::::::::=+#******####******#-
.+#%####%#%%%%#*=-::.....:-:....:-+:.........................::::-=+++=--:::::::::::=+#*******####*******-
-*#####%%%%%%##*=-:::...:-::..:::*-......................::::::--=++=---:::::::::-=+*********#####******-
.+######%%%#%%##*=-::::::--::::::=:...................::::::::--=+*=---:::::::::-++****#*****####*******-
:*######%%######*+=:::::-=-:::::::...............::::::::::---=+++=---::::::::=+++***#*****#####*******-
-######%%#######*+=-::::-=::::::::.............::::::::::--==+*+=-----::::--+++****#******#####*******-
=######%%########*=-::::--:::::...:.........:::::::::::--==++===---------=+++****##******%###*#******-
-#%#%%%%#####%%###+=---:::::::..:::....:::::::::::::--==+**+++=========++++****###*****#####********-
-##%%%%%%###%%%%%##*=--:::::::::::::.:::::::::-::--==+*#%#######=::+*+++*****##*******#####********-
-#%%%%%%%%%%%%%%%%%#+=--:::::::::::::::::-------==+*#%%%%#####%#=..=++****####******#%###*********-
-#%%%%%%%%%%%%%%%%%%#*+=---:::::::::----======+##%%%%%%%########*+++***####
2023-12-24 10:09:50
import java.util.Scanner;

public class Think {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
int i = 1;
int result = 0;
int result2 = 0;
int s = 1;
while (i <= a) {
i++;
if (a % i == 0 && b % i == 0) {
result = a / i;
result2 = b / i;
}
}
System.out.println(result + "/" + result2);
}
}dans:5810171730
2023-02-17 01:20:08
#include<stdio.h>
int main()
{
int a, b, i=0, c, d, e;
scanf("%d%d", &a, &b);
for(i=1; i<=a&&b; i++)
if(a%i==0&&b%i==0)
c=i;
e=a/c;
d=b/c;
printf("%d/%d", e, d);
return 0;
}

SDOLZ
2022-10-25 09:48:07
eniig ashigla my boii
#include <bits/stdc++.h>
using namespace std;
main()
{
int a,b,c,d,s,f,g,h,j,k,l,p,o,i,u,y,t,r,e,w,q,z,x,v,n,m;
cin>>a>>b;
c=__gcd(a,b);
a=a/c;
b=b/c;
cout<<a<<"/"<<b;
}
2022-10-18 05:09:15
int nu1,b=0,nu2;
Scanner scan = new Scanner (System.in);
nu1=scan.nextInt();
nu2=scan.nextInt();
for(int i=1;i<nu1;i++)
{
if(nu1%i==0 && nu2%i==0)
{
nu1=nu1/i;
nu2=nu2/i;
}
}
System.out.print(nu1+"/"+nu2);
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.