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

RGB7311 - Гуравын зэрэгтэд хураа

Өгөгдсөн тоог 3-ын зэрэгтэд хураа.

Input

Бүхэл тоо өгөгдөнө.

Output

Хураагдсан тоо.

Example

Input:

36

Output:

4


Нэмсэн: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-04-15 04:01:33
#include <iostream>
#include <sstream>
#include <string>
#include <cstdlib>
#include <cmath>

using namespace std;

// Headers
string toString (double);
int toInt (string);
double toDouble (string);

int main() {
int n;

cin >> n;
while (n % 3 == 0) {
n = (int) ((double) n / 3);
}
cout << n << endl;
return 0;
}

// The following implements type conversion functions.
string toString (double value) { //int also
stringstream temp;
temp << value;
return temp.str();
}

int toInt (string text) {
return atoi(text.c_str());
}

double toDouble (string text) {
return atof(text.c_str());
}
2024-04-15 03:53:26
#include <iostream>
#include <sstream>
#include <string>
#include <cstdlib>
#include <cmath>

using namespace std;

// Headers
string toString (double);
int toInt (string);
double toDouble (string);

int main() {
int n;

cin >> n;
while (n % 3 == 0) {
n = (int) ((double) n / 3);
}
cout << n << endl;
return 0;
}

// The following implements type conversion functions.
string toString (double value) { //int also
stringstream temp;
temp << value;
return temp.str();
}

int toInt (string text) {
return atoi(text.c_str());
}

double toDouble (string text) {
return atof(text.c_str());
}
2024-01-14 09:32:32
#include<iostream>
using namespace std;
int main ()
{
int n;
cin>>n;
while(n%3==0 and n>1)
n=n/3;
cout<<n;
}















































































































































































































































































































































































































































































































































































































































































//mai lalaruudaa
2024-01-04 09:38:44
#include<iostream>
using namespace std;
int main ()
{
int n;
cin>>n;
while(n%3==0 and n>1)
n=n/3;
cout<<n;
}
mai muu suguud
2023-12-09 15:03:54
#include <iostream>

using namespace std;

int main()
{
int a ;
cin >> a ;
while(a % 3 == 0 && a > 1){
a = a / 3;
}
cout << a << endl;
return 0;
}
2023-07-12 14:26:48
#include <stdio.h>
int main() {
int ajax;
scanf("%d", &ajax);
while(ajax % 3 == 0 && ajax > 1){
ajax=ajax/3;
}
printf("%d", ajax);
return 0;
}
2023-07-04 04:27:28
#include <iostream>
#include <cmath>
using namespace std;

int main() {
double number;
cout << "Тоо оруулна уу: ";
cin >> number;

double result = pow(number, 1.0 / 3.0);

cout << "3-ын зэрэгт хураагдсан утга: " << result << endl;

return 0;
}
2023-05-02 03:02:26




































1




























mal




























pzd
















































2023-05-02 02:55:20
7a munkh orgil is gay more than his gay friend

Last edit: 2023-05-02 02:56:48
2023-02-17 01:07:14
#include <stdio.h>

int main() {

int ajax;
scanf("%d", &ajax);
while(ajax % 3 == 0 && ajax > 1){
ajax=ajax/3;
}
printf("%d", ajax);

return 0;
}
SODOLZ
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.