Weekly Challenge #20
Hey there replers! 3 weeks ago, we started the 5th batch of repl.it weekly challenges!
So below are the results for the last weekly challenge aka Weekly Challenge #19.
WEEKLY 19 Results
Here are the results for the weekly challenge #19.
RANK 1 : @HarperframeInc
RANK 2 : @Lord_Poseidon
RANK 3 : @fuzzyastrocat
In case you did not make into the top 3, you can check out your score at the weekly results website - https://weekly.thedrone7.repl.co
But before that, here's this week's weekly challenge for you all!
DISTINCT MULTIPLICATION TABLES!
Moving on with this month's theme of more math, for this week's challenge, you are to take two integers as input from the user -
c respectively and generate a table of
r rows and
c columns, index starting from
1 instead of
0. Then each cell value will be the product of the row and column indices. And then, use the table to check the number of unique values in the entirety of the table.
For example: -
User input :
Generated Table :
1 2 3 4 2 4 6 8 3 6 9 12
The distinct values are - 1, 2, 3, 4, 6, 8, 9, 12.
There are 8 distinct values in a 3x4 multiplication table.
For submitting your repls, post them on the repl talk share board and ensure that they contain
#WEEKLY in their name.
NOTE : You cannot have multiple weekly challenge submissions but if you want to share multiple ways of achieving the goal, you can make regular posts that don't contain
#WEEKLYin their name, even
And that's it for today, code away and have fun replers!
is it okay to have error/exception handling if the user types in an invalid value
This one is too easy in JS, so I'm doing it in BrainF! So far have an array system! Next up: filtering distinct values and adding user input.