5 kyu

Primes in numbers

3,947 of 30,365g964

Description:

Given a positive number n > 1 find the prime factor decomposition of n. The result will be a string with the following form :

 "(p1**n1)(p2**n2)...(pk**nk)"

with the p(i) in increasing order and n(i) empty if n(i) is 1.

Example: n = 86240 should return "(2**5)(5)(7**2)(11)"
Fundamentals
Mathematics

More By Author:

Check out these other kata created by g964

Stats:

CreatedFeb 6, 2015
PublishedFeb 6, 2015
Warriors Trained109237
Total Skips38233
Total Code Submissions145541
Total Times Completed30365
Java Completions3947
Ruby Completions844
Python Completions10355
C# Completions1809
Clojure Completions120
JavaScript Completions6105
Haskell Completions265
CoffeeScript Completions21
C++ Completions2466
PHP Completions748
Crystal Completions7
Swift Completions299
C Completions768
TypeScript Completions745
Rust Completions742
R Completions77
Shell Completions47
F# Completions51
OCaml Completions28
Elixir Completions85
Groovy Completions17
Julia Completions62
Scala Completions171
PowerShell Completions30
Go Completions673
Nim Completions19
Racket Completions24
Reason Completions3
Kotlin Completions327
Prolog Completions12
Haxe Completions4
Dart Completions199
Pascal Completions9
Lua Completions60
Perl Completions9
Elm Completions4
D Completions8
COBOL Completions4
Erlang Completions5
Total Stars2052
% of votes with a positive feedback rating90% of 3138
Total "Very Satisfied" Votes2610
Total "Somewhat Satisfied" Votes451
Total "Not Satisfied" Votes77
Ad
Contributors
  • g964 Avatar
  • jhoffner Avatar
  • GiacomoSorbi Avatar
  • kazk Avatar
  • Blind4Basics Avatar
  • garoal Avatar
  • Voile Avatar
  • monadius Avatar
  • user9644768 Avatar
  • hobovsky Avatar
  • user3029010 Avatar
  • user8436785 Avatar
  • akar-0 Avatar
Ad