Skip to main content
deleted 2522 characters in body
Source Link
Oliver Ni
  • 10.6k
  • 3
  • 38
  • 107
0/1 => Terminating
0/2 => Terminating
1/2 => Terminating
0/3 => Terminating
1/3 => Purely Periodic
2/3 => Purely Periodic
0/4 => Terminating
1/4 => Terminating
2/4 => Terminating
3/4 => Terminating
0/5 => Terminating
1/5 => Terminating
2/5 => Terminating
3/5 => Terminating
4/5 => Terminating
0/6 => Terminating
1/6 => Eventually Periodic
2/6 => Purely Periodic
3/6 => Terminating
4/6 => Purely Periodic
5/6 => Eventually Periodic
0/7 => Terminating
1/7 => Purely Periodic
2/7 => Purely Periodic
3/7 => Purely Periodic
4/7 => Purely Periodic
5/7 => Purely Periodic
6/7 => Purely Periodic
0/8 => Terminating
1/8 => Terminating
2/8 => Terminating
3/8 => Terminating
4/8 => Terminating
5/8 => Terminating
6/8 => Terminating
7/8 => Terminating
0/9 => Terminating
1/9 => Purely Periodic
2/9 => Purely Periodic
3/9 => Purely Periodic
4/9 => Purely Periodic
5/9 => Purely Periodic
6/9 => Purely Periodic
7/9 => Purely Periodic
8/9 => Purely Periodic
0/10 => Terminating
1/10 => Terminating
2/10 => Terminating
3/10 => Terminating
4/10 => Terminating
5/10 => Terminating
6/10 => Terminating
7/10 => Terminating
8/10 => Terminating
9/10 => Terminating
0/11 => Terminating
1/11 => Purely Periodic
2/11 => Purely Periodic
3/11 => Purely Periodic
4/11 => Purely Periodic
5/11 => Purely Periodic
6/11 => Purely Periodic
7/11 => Purely Periodic
8/11 => Purely Periodic
9/11 => Purely Periodic
10/11 => Purely Periodic
0/12 => Terminating
1/12 => Eventually Periodic
2/12 => Eventually Periodic
3/12 => Terminating
4/12 => Purely Periodic
5/12 => Eventually Periodic
6/12 => Terminating
7/12 => Eventually Periodic
8/12 => Purely Periodic
9/12 => Terminating
10/12 => Eventually Periodic
11/12 => Eventually Periodic
0/13 => Terminating
1/13 => Purely Periodic
2/13 => Purely Periodic
3/13 => Purely Periodic
4/13 => Purely Periodic
5/13 => Purely Periodic
6/13 => Purely Periodic
7/13 => Purely Periodic
8/13 => Purely Periodic
9/13 => Purely Periodic
10/13 => Purely Periodic
11/13 => Purely Periodic
12/13 => Purely Periodic
0/14 => Terminating
1/14 => Eventually Periodic
2/14 => Purely Periodic
3/14 => Eventually Periodic
4/14 => Purely Periodic
5/14 => Eventually Periodic
6/14 => Purely Periodic
7/14 => Terminating
8/14 => Purely Periodic
9/14 => Eventually Periodic
10/14 => Purely Periodic
11/14 => Eventually Periodic
12/14 => Purely Periodic
13/14 => Eventually Periodic
0/15 => Terminating
1/15 => Eventually Periodic
2/15 => Eventually Periodic
3/15 => Terminating
4/15 => Eventually Periodic
5/15 => Purely Periodic
6/15 => Terminating
7/15 => Eventually Periodic
8/15 => Eventually Periodic
9/15 => Terminating
10/15 => Purely Periodic
11/15 => Eventually Periodic
12/15 => Terminating
13/15 => Eventually Periodic
14/15 => Eventually Periodic
0/16 => Terminating
1/16 => Terminating
2/16 => Terminating
3/16 => Terminating
4/16 => Terminating
5/16 => Terminating
6/16 => Terminating
7/16 => Terminating
8/16 => Terminating
9/16 => Terminating
10/16 => Terminating
11/16 => Terminating
12/16 => Terminating
13/16 => Terminating
14/16 => Terminating
15/16 => Terminating
0/17 => Terminating
1/17 => Purely Periodic
2/17 => Purely Periodic
3/17 => Purely Periodic
4/17 => Purely Periodic
5/17 => Purely Periodic
6/17 => Purely Periodic
7/17 => Purely Periodic
8/17 => Purely Periodic
9/17 => Purely Periodic
10/17 => Purely Periodic
11/17 => Purely Periodic
12/17 => Purely Periodic
13/17 => Purely Periodic
14/17 => Purely Periodic
15/17 => Purely Periodic
16/17 => Purely Periodic
0/18 => Terminating
1/18 => Eventually Periodic
2/18 => Purely Periodic
3/18 => Eventually Periodic
4/18 => Purely Periodic
5/18 => Eventually Periodic
6/18 => Purely Periodic
7/18 => Eventually Periodic
8/18 => Purely Periodic
9/18 => Terminating
10/18 => Purely Periodic
11/18 => Eventually Periodic
12/18 => Purely Periodic
13/18 => Eventually Periodic
14/18 => Purely Periodic
15/18 => Eventually Periodic
16/18 => Purely Periodic
17/18 => Eventually Periodic
0/19 => Terminating
1/19 => Purely Periodic
2/19 => Purely Periodic
3/19 => Purely Periodic
4/19 => Purely Periodic
5/19 => Purely Periodic
6/19 => Purely Periodic
7/19 => Purely Periodic
8/19 => Purely Periodic
9/19 => Purely Periodic
10/19 => Purely Periodic
11/19 => Purely Periodic
12/19 => Purely Periodic
13/19 => Purely Periodic
14/19 => Purely Periodic
15/19 => Purely Periodic
16/19 => Purely Periodic
17/19 => Purely Periodic
18/19 => Purely Periodic
0/20 => Terminating
1/20 => Terminating
2/20 => Terminating
3/20 => Terminating
4/20 => Terminating
5/20 => Terminating
6/20 => Terminating
7/20 => Terminating
8/20 => Terminating
9/20 => Terminating
10/20 => Terminating
11/20 => Terminating
12/20 => Terminating
13/20 => Terminating
14/20 => Terminating
15/20 => Terminating
16/20 => Terminating
17/20 => Terminating
18/20 => Terminating
19/20 => Terminating
0/1 => Terminating
0/2 => Terminating
1/2 => Terminating
0/3 => Terminating
1/3 => Purely Periodic
2/3 => Purely Periodic
0/4 => Terminating
1/4 => Terminating
2/4 => Terminating
3/4 => Terminating
0/5 => Terminating
1/5 => Terminating
2/5 => Terminating
3/5 => Terminating
4/5 => Terminating
0/6 => Terminating
1/6 => Eventually Periodic
2/6 => Purely Periodic
3/6 => Terminating
4/6 => Purely Periodic
5/6 => Eventually Periodic
0/7 => Terminating
1/7 => Purely Periodic
2/7 => Purely Periodic
3/7 => Purely Periodic
4/7 => Purely Periodic
5/7 => Purely Periodic
6/7 => Purely Periodic
0/8 => Terminating
1/8 => Terminating
2/8 => Terminating
3/8 => Terminating
4/8 => Terminating
5/8 => Terminating
6/8 => Terminating
7/8 => Terminating
0/9 => Terminating
1/9 => Purely Periodic
2/9 => Purely Periodic
3/9 => Purely Periodic
4/9 => Purely Periodic
5/9 => Purely Periodic
6/9 => Purely Periodic
7/9 => Purely Periodic
8/9 => Purely Periodic
0/10 => Terminating
1/10 => Terminating
2/10 => Terminating
3/10 => Terminating
4/10 => Terminating
5/10 => Terminating
6/10 => Terminating
7/10 => Terminating
8/10 => Terminating
9/10 => Terminating
0/11 => Terminating
1/11 => Purely Periodic
2/11 => Purely Periodic
3/11 => Purely Periodic
4/11 => Purely Periodic
5/11 => Purely Periodic
6/11 => Purely Periodic
7/11 => Purely Periodic
8/11 => Purely Periodic
9/11 => Purely Periodic
10/11 => Purely Periodic
0/12 => Terminating
1/12 => Eventually Periodic
2/12 => Eventually Periodic
3/12 => Terminating
4/12 => Purely Periodic
5/12 => Eventually Periodic
6/12 => Terminating
7/12 => Eventually Periodic
8/12 => Purely Periodic
9/12 => Terminating
10/12 => Eventually Periodic
11/12 => Eventually Periodic
0/13 => Terminating
1/13 => Purely Periodic
2/13 => Purely Periodic
3/13 => Purely Periodic
4/13 => Purely Periodic
5/13 => Purely Periodic
6/13 => Purely Periodic
7/13 => Purely Periodic
8/13 => Purely Periodic
9/13 => Purely Periodic
10/13 => Purely Periodic
11/13 => Purely Periodic
12/13 => Purely Periodic
0/14 => Terminating
1/14 => Eventually Periodic
2/14 => Purely Periodic
3/14 => Eventually Periodic
4/14 => Purely Periodic
5/14 => Eventually Periodic
6/14 => Purely Periodic
7/14 => Terminating
8/14 => Purely Periodic
9/14 => Eventually Periodic
10/14 => Purely Periodic
11/14 => Eventually Periodic
12/14 => Purely Periodic
13/14 => Eventually Periodic
0/15 => Terminating
1/15 => Eventually Periodic
2/15 => Eventually Periodic
3/15 => Terminating
4/15 => Eventually Periodic
5/15 => Purely Periodic
6/15 => Terminating
7/15 => Eventually Periodic
8/15 => Eventually Periodic
9/15 => Terminating
10/15 => Purely Periodic
11/15 => Eventually Periodic
12/15 => Terminating
13/15 => Eventually Periodic
14/15 => Eventually Periodic
0/16 => Terminating
1/16 => Terminating
2/16 => Terminating
3/16 => Terminating
4/16 => Terminating
5/16 => Terminating
6/16 => Terminating
7/16 => Terminating
8/16 => Terminating
9/16 => Terminating
10/16 => Terminating
11/16 => Terminating
12/16 => Terminating
13/16 => Terminating
14/16 => Terminating
15/16 => Terminating
0/17 => Terminating
1/17 => Purely Periodic
2/17 => Purely Periodic
3/17 => Purely Periodic
4/17 => Purely Periodic
5/17 => Purely Periodic
6/17 => Purely Periodic
7/17 => Purely Periodic
8/17 => Purely Periodic
9/17 => Purely Periodic
10/17 => Purely Periodic
11/17 => Purely Periodic
12/17 => Purely Periodic
13/17 => Purely Periodic
14/17 => Purely Periodic
15/17 => Purely Periodic
16/17 => Purely Periodic
0/18 => Terminating
1/18 => Eventually Periodic
2/18 => Purely Periodic
3/18 => Eventually Periodic
4/18 => Purely Periodic
5/18 => Eventually Periodic
6/18 => Purely Periodic
7/18 => Eventually Periodic
8/18 => Purely Periodic
9/18 => Terminating
10/18 => Purely Periodic
11/18 => Eventually Periodic
12/18 => Purely Periodic
13/18 => Eventually Periodic
14/18 => Purely Periodic
15/18 => Eventually Periodic
16/18 => Purely Periodic
17/18 => Eventually Periodic
0/19 => Terminating
1/19 => Purely Periodic
2/19 => Purely Periodic
3/19 => Purely Periodic
4/19 => Purely Periodic
5/19 => Purely Periodic
6/19 => Purely Periodic
7/19 => Purely Periodic
8/19 => Purely Periodic
9/19 => Purely Periodic
10/19 => Purely Periodic
11/19 => Purely Periodic
12/19 => Purely Periodic
13/19 => Purely Periodic
14/19 => Purely Periodic
15/19 => Purely Periodic
16/19 => Purely Periodic
17/19 => Purely Periodic
18/19 => Purely Periodic
0/20 => Terminating
1/20 => Terminating
2/20 => Terminating
3/20 => Terminating
4/20 => Terminating
5/20 => Terminating
6/20 => Terminating
7/20 => Terminating
8/20 => Terminating
9/20 => Terminating
10/20 => Terminating
11/20 => Terminating
12/20 => Terminating
13/20 => Terminating
14/20 => Terminating
15/20 => Terminating
16/20 => Terminating
17/20 => Terminating
18/20 => Terminating
19/20 => Terminating
0/1 => Terminating
0/2 => Terminating
1/2 => Terminating
0/3 => Terminating
1/3 => Purely Periodic
2/3 => Purely Periodic
0/4 => Terminating
1/4 => Terminating
2/4 => Terminating
3/4 => Terminating
0/5 => Terminating
1/5 => Terminating
2/5 => Terminating
3/5 => Terminating
4/5 => Terminating
0/6 => Terminating
1/6 => Eventually Periodic
2/6 => Purely Periodic
3/6 => Terminating
4/6 => Purely Periodic
5/6 => Eventually Periodic
0/7 => Terminating
1/7 => Purely Periodic
2/7 => Purely Periodic
3/7 => Purely Periodic
4/7 => Purely Periodic
5/7 => Purely Periodic
6/7 => Purely Periodic
0/8 => Terminating
1/8 => Terminating
2/8 => Terminating
3/8 => Terminating
4/8 => Terminating
5/8 => Terminating
6/8 => Terminating
7/8 => Terminating
0/9 => Terminating
1/9 => Purely Periodic
2/9 => Purely Periodic
3/9 => Purely Periodic
4/9 => Purely Periodic
5/9 => Purely Periodic
6/9 => Purely Periodic
7/9 => Purely Periodic
8/9 => Purely Periodic
0/10 => Terminating
1/10 => Terminating
2/10 => Terminating
3/10 => Terminating
4/10 => Terminating
5/10 => Terminating
6/10 => Terminating
7/10 => Terminating
8/10 => Terminating
9/10 => Terminating
0/11 => Terminating
1/11 => Purely Periodic
2/11 => Purely Periodic
3/11 => Purely Periodic
4/11 => Purely Periodic
5/11 => Purely Periodic
6/11 => Purely Periodic
7/11 => Purely Periodic
8/11 => Purely Periodic
9/11 => Purely Periodic
10/11 => Purely Periodic
0/12 => Terminating
1/12 => Eventually Periodic
2/12 => Eventually Periodic
3/12 => Terminating
4/12 => Purely Periodic
5/12 => Eventually Periodic
6/12 => Terminating
7/12 => Eventually Periodic
8/12 => Purely Periodic
9/12 => Terminating
10/12 => Eventually Periodic
11/12 => Eventually Periodic
0/13 => Terminating
1/13 => Purely Periodic
2/13 => Purely Periodic
3/13 => Purely Periodic
4/13 => Purely Periodic
5/13 => Purely Periodic
6/13 => Purely Periodic
7/13 => Purely Periodic
8/13 => Purely Periodic
9/13 => Purely Periodic
10/13 => Purely Periodic
11/13 => Purely Periodic
12/13 => Purely Periodic
0/14 => Terminating
1/14 => Eventually Periodic
2/14 => Purely Periodic
3/14 => Eventually Periodic
4/14 => Purely Periodic
5/14 => Eventually Periodic
6/14 => Purely Periodic
7/14 => Terminating
8/14 => Purely Periodic
9/14 => Eventually Periodic
10/14 => Purely Periodic
11/14 => Eventually Periodic
12/14 => Purely Periodic
13/14 => Eventually Periodic
0/15 => Terminating
1/15 => Eventually Periodic
2/15 => Eventually Periodic
3/15 => Terminating
4/15 => Eventually Periodic
5/15 => Purely Periodic
6/15 => Terminating
7/15 => Eventually Periodic
8/15 => Eventually Periodic
9/15 => Terminating
10/15 => Purely Periodic
11/15 => Eventually Periodic
12/15 => Terminating
13/15 => Eventually Periodic
14/15 => Eventually Periodic
added 1 character in body
Source Link
Oliver Ni
  • 10.6k
  • 3
  • 38
  • 107

Write a program or function that, when given a fraction in the formnumbers p/ and q (integers, 0 <= p < q <= 100), will determine if itsthe decimal representation of p/q is terminating, purely periodic, or eventually periodic.

Write a program or function that, when given a fraction in the form p/q (integers, 0 <= p < q <= 100) will determine if its decimal representation is terminating, purely periodic, or eventually periodic.

Write a program or function that, when given numbers p and q (integers, 0 <= p < q <= 100), will determine if the decimal representation of p/q is terminating, purely periodic, or eventually periodic.

Notice removed Draw attention by Oliver Ni
Bounty Ended with Dennis's answer chosen by Oliver Ni
Notice added Draw attention by Oliver Ni
Bounty Started worth 50 reputation by Oliver Ni
ans -> and
Source Link
user19214
user19214

You must output a if it's Terminating (i.e. 0.1), b if it's Purely Periodic (i.e. 0.333...), or c if it's Eventually Periodic (i.e. 0.166...), where a, b, ansand c are any distinct, constant strings of your choice.

You must output a if it's Terminating (i.e. 0.1), b if it's Purely Periodic (i.e. 0.333...), or c if it's Eventually Periodic (i.e. 0.166...), where a, b, ans c are any distinct, constant strings of your choice.

You must output a if it's Terminating (i.e. 0.1), b if it's Purely Periodic (i.e. 0.333...), or c if it's Eventually Periodic (i.e. 0.166...), where a, b, and c are any distinct, constant strings of your choice.

added 10 characters in body
Source Link
Oliver Ni
  • 10.6k
  • 3
  • 38
  • 107
Loading
added 217 characters in body
Source Link
Oliver Ni
  • 10.6k
  • 3
  • 38
  • 107
Loading
Tweeted twitter.com/StackCodeGolf/status/785921220793475072
edited tags
Link
Oliver Ni
  • 10.6k
  • 3
  • 38
  • 107
Loading
added 4846 characters in body
Source Link
Oliver Ni
  • 10.6k
  • 3
  • 38
  • 107
Loading
added 4846 characters in body
Source Link
Oliver Ni
  • 10.6k
  • 3
  • 38
  • 107
Loading
added 107 characters in body
Source Link
Oliver Ni
  • 10.6k
  • 3
  • 38
  • 107
Loading
Source Link
Oliver Ni
  • 10.6k
  • 3
  • 38
  • 107
Loading