https://github.com/pauldraper/paul-test
https://github.com/pauldraper/paul-test
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pauldraper/paul-test
- Owner: pauldraper
- Created: 2016-10-20T10:00:46.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-20T10:48:20.000Z (over 9 years ago)
- Last Synced: 2025-06-19T13:53:53.879Z (about 1 year ago)
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# No squares2

## Description
**Factoring** a positive integer is decomposing it into a product of one or more integers greater than 1. For example, 24 can be factored as 24, 2×12, 3×8, 4×6, 2×2×6, 2×3×4, or 2×2×2×3.
A **square** is an integer that can be factored as two equal integers. For example, 4 is square because it can be factored as 2×2.
If a factoring has any factor that is divisible by a square greater than 1, let's call it **squarish**. For example, since 4 is a square, five of the factorings of 24 are squarish: 24, 2×12, 3×8, 4×6, and 2×3×4. That leaves two non-squarish factorings: 2×2×6 and 2×2×2×3.
Given a postive integer, find the shortest possible length of a non-squarish factoring. For example, for 24, the shortest possible length is three (2×2×6).
## Input
An integer between 2 and 2,000,000 inclusive.
## Output
The shortest length of the integer's non-squarish factoring.
## Examples
### Input 1
```
24
```
### Output 1
```
3
```