Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #79: Find the Closest Prime Number

asultanov
8 - Asteroid

Tricky! Added cases for if the number entered was prime, the prime numbers are equidistant, or the number entered was 1.

Spoiler
Screenshot 2024-04-16 114043.pngScreenshot 2024-04-16 114054.pngScreenshot 2024-04-16 114102.png
aatalai
14 - Magnetar

only looked at number less, but getting back into apps

KosukeUchihashi
8 - Asteroid

I came up with 2 solutions, but both of them take a long time :(

One solution is with Generate Rows tool , and the other is without the tool.

Was a good challenge anyways.

Christina_H
14 - Magnetar

My solution attached

Bobbyt23
12 - Quasar

Sheldon Cooper's favourite Prime number is 73!

 

"73 is the 21st prime number. Its mirror, 37, is the 12th and its mirror, 21, is the product of multiplying 7 and 3 ... and in binary 73 is a palindrome, 1001001, which backwards is 1001001."

Carolyn
11 - Bolide

I had a bit of a "why do it the easy way when you can make the challenge harder by adding more features?" moment. Mine will tell you if the number itself is prime, what the next prime down is, and what the next prime up is. I realized that they asked us just to do the next prime up since if it's the next prime down, you need extra handling for 2 and less, because there aren't primes below them. 

 

Input range is 1-10,000

 

 

Spoiler
2024-07-02_08-51-32.png

2024-07-02_08-52-02.png

 

 

mshishido
8 - Asteroid

COOL ONE

DaisukeTsuchiya
13 - Pulsar
Spoiler
temp.png
Zongkai
8 - Asteroid

A very good practise for

1. How to take a blank record as final. Summarise with 0 Text Input.

2. How to diverge on a condition. Filter with Join tool.

3. How to filter out with true value. Join back true with false.


Did not know a square root method is more efficient.

 

knagano
7 - Meteor

My solution

 

Spoiler
Challenge_79_WF.png

Challenge_79_Macro.png