Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
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
|
|||||||
2019-10-29 08:44:13
#include <iostream> using namespace std; int main(){ int n; cin>>n; while(n%3==0){ n=n/3; } cout<<n<<endl; return 0; }mo huul |
|||||||
2019-10-12 06:05:44
hahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha hahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha hahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha hahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha hahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha hahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha Last edit: 2019-10-12 06:06:33 |
|||||||
2019-10-11 08:49:20
oorsdoo huugeech orc uudaa |
|||||||
2019-10-09 13:59:22
GG LOL OOFFFF |
|||||||
2019-04-09 15:42:10
#include <iostream> #include<math.h> using namespace std; int main() { int n; scanf("%d",&n); while(n%3==0) { n=n/3; } printf("%d",n); } Last edit: 2019-04-09 15:44:45 |
|||||||
2019-03-12 04:01:07
zow bodod bhad buruu ged bh ymaaa |
|||||||
2019-03-01 10:17:25
#include <iostream> #include<math.h> using namespace std; main() { long long n, r, a, i = 0; cin>>n; a=n; r=pow(3,i); while (n>=r) { if (n%r==0) { a=n/r; } i=i+1; r=pow(3,i); } cout<<a<<endl; return 0; } |
|||||||
2019-02-09 07:19:37
#include <iostream> #include<math.h> using namespace std; int main() { int n, r, a, i = 0; cin >> n; a = n; r = pow( 3, i ); while ( n >= r ) { if ( n % r == 0) { a = n / r; } i = i + 1; r = pow( 3, i ); } cout << a << endl; return 0; } //hN Last edit: 2019-02-09 07:20:16 |
|||||||
2018-12-13 02:49:19
#include<iostream> using namespace std; int main(){ int a,b=1,c,i; cin >> a; int l=a; while(c%b==0){ b=b*3; c=a/b; } cout << c; return 0; } zow l baih bodson ym shig baihiin buruu gd bhiin medqeeee |
|||||||
2018-11-15 07:19:43
zuv bolood bhd buruu hariult gd bhin. eniigee zasaj uguuchee SPOJ iihan. hezee zashiin bee? |