+ 5
*DAILY CHALLENGE* : Write a function that calculates and prints the n'th 'quix-number' to screen!
INFO: A quix-number is a positive int x. Convert x into binary b and octal o and interpret b and o as decimal numbers again. If b%o == 0 and b%x == 0 then x is a quix-number! EXAMPLE: x = 40 o = 50 b = 101000 b%o = 101000%50 = 0 b%x = 101000%40 = 0 ---> 40 is a quix-number! PLEASE DON'T USE BUILT-IN FUNCTIONS FOR BIN/OCT-CONVERSATION! WRITE YOUR OWN!!! https://www.sololearn.com/Discuss/2968640/?ref=app
38 Respostas
+ 2
Quix Number program: My submission
Thanks for the challenge!
https://code.sololearn.com/c4P38i5bD2JL/?ref=app
+ 10
quix-numbers
https://code.sololearn.com/cDSMV3jkc2Es/?ref=app
+ 10
+ 5
I wont do any.additionnal challenge until you reward the ones already there !
+ 5
@Julian - automatic checker is a great idea, but it requires accurate definition of program's input and output, and you didn't define it accurately enough.
For example, if one program outputs:
262144
and another program outputs:
The 36th quix number is 262144
How do you tell which one is correct? (They are both correct...)
Another issue is restrictions you make in the task that are not easy to automatically check. In this challenge, there is a requirement to implement bin/oct conversions using basic language without using builtin library functions. Having the automated checker verify this is a challenge of its own...
I also think that code clarity is more important than efficiency in most cases, so judging only time is problematic. Also if your checker is not thorough enough it might not catch any bug.
And also I doubt you can compare times with programs written in different languages. There are inherent performance differences between the languages, and I bet the Sololearn environments for the various languages are not all equal..
Bottom line, I think it's a good idea apply automated checker:
1) Need to define the program's output precisely.
2) The checker should only detect bugs to disqualify buggy programs
3) The judging should be done "manually" among those programs that passed the checker.
+ 5
@Julian
Then wouldnt C++ codes most likely always wins since they are proven to run ~10x faster than most average programming languages.
You are not thinking about a realistic point of view. A good code is something which you yourself can read and understand. (And doesnt look bad).
+ 4
I already have a base conversion fully working and can convert to any positive K bases properly.
(Its written in F# btw)
Im lazy to do a (b%o == 0) checking, so just going to leave the link to code here.
https://github.com/Yeo-Wen-Qin/BaseConversions
+ 3
@VcC
I'm currently worling on an nice little test-script that runs all codes, times them, calculate avg exec time and output the winner. this will be an html page and i'll upload the link as soon as possible!
give me a little more time ;)
(maybee at the week-end)
+ 3
that's my code.. try it!
https://code.sololearn.com/cS5amMV46VyM/?ref=app
+ 2
Could you look at the old challenges and elect winners, Julian Fechner?
+ 1
heres mine
can work up to 200k
https://code.sololearn.com/c5lmpitGrckB/?ref=app
+ 1
My code in java
https://code.sololearn.com/cjOUoZGlbIXb/?ref=app
+ 1
Here's my solution in Python.
So far it's the only solution that doesn't use int/str conversions. Works solely with numbers.
https://code.sololearn.com/cdWTkDwbH9h6
+ 1
@Timon, please refrain from making claims about everyone else ;-)
+ 1
its ok Timon...
thers millions of people thousands of challenges one after another..
how about taking them as a practice
evalution of so much code is not possible...most of the time
yours the credit if you can manage the right output while displaying..
+ 1
i thought you could evaluate the codes of these 3 daily challenges in 1 to 2 hours. i posted my last comment because i didn't want that you think you must evaluate the last 20 challenges or something. i wanted the opposite of what came across. i didn't want to make claims or judge anybody, i'm graceful that you even do it in your free time.
+ 1
Here you go. Checks for valid input.
https://code.sololearn.com/cya2M8tLX1YY/?ref=app