Retired
noobCode 01: SUPERSIZE ME.... or rather, this integer! (retired)
5,211 of 11,682ozymandias1
Loading description...
Algorithms
Integers
Data Types
Numbers
Arrays
Strings
split
Haskell Packages
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/79 Please join the discussion to share your opinions, and help us identify duplicate kata and retire them.
Retired
Swift translation added =)
Need approval
for C
very small issue where tests generate warnings has appeared:
I'm getting the same error message.
programming language: C
fixed in list of C katas to update
This comment has been hidden.
'Looks like you've solved it'
Can't understand this error "The expression (super_size(value)) == (super_size_tester(value)) is false." The code give correct result
It means exactly the opposite. Expected and actual values aren't equal, that's why you're getting this message. Maybe try to
printf(...)
the input, and your output to make sure they're correct?Why is this kata saying that for input value '696' it should return '96'. I hope that's not the case as the instructions say nothing about this? All the assertions are getting failed becuase they are removing the duplicate values and checking the final output without any duplicate digits.
Check and confirm the desired output.
Also, the sample tests are having the below line: Test.assert_equals(super_size(69),96) But when I run the tests, it is checking for 696 and according to the assertion it should return 96. This is just one example but all the other examples are also giving the same problem.
You're probably logging too much info? Just use
print(n)
.The tests are fine (2418 Python completions). It must be problem with your code.
i get the error EOF with my n = input() ... i don't get it, work just fine on my prog
You don't need to ask for input, you're getting
n
as function argument.Julia translation
CFML translation (author inactive)
Duplicate of this kata:
https://www.codewars.com/kata/5a4ea304b3bfa89a9900008e (Form the Largest)
Not an issue.
Prolog translation kumited. (author inactive)
Python 3 should be enabled.
This comment has been hidden.
It's hard to read without "markdown" formatting, where you add 3 back tic marks around the code.
This comment has been hidden.
Not an issue.
This comment has been hidden.
This test won't pass Expected: 710000000000, instead got: 71000000000 There is a zero missing from the 'instead got: 71000000000'. This is seen when you put them alongside each other. 710000000000 71000000000
C translation kumited. :)
C#-Translation kumited!
https://www.codewars.com/kumite/57d01020eca260ca5700204e
Please check and approve it! ;-)
Typo in description: interger
thanks for catching that :)
This is copied directly from the failed test I just ran:
make sure you're returning a number not a string.
This comment has been hidden.
Hi ozymandias1,
Can you please help me? I don't understand why the code I wrote won't pass the tests, as the expected result looks (to me) the same as the result the code i wrote got. I think it's probably my mistake - can I send you the code I wrote? Thanks
you can post the solution below and mark it as a spoiler then someone who has completed this kata before can review your code and point you in the right direction
This comment has been hidden.
parseInt
is meant for strings, not for numbers. Sure,parseInt(12.5)
will return12
, but that's since it transforms12.5
to a string (internally). UseMath.floor
to get the next integral number (towards negative infinity).assertEquals
, which uses===
. The triple equality operator not only checks whether two values are the same, but also whether their types coincide (try12 === "12"
).,
. Keep in mind that,
in "Expected<xxx>
," isn't part of the expected value. That won't be an issue if you fix #2 above, though.By the way, if you don't get answers on questions, feel free to ask on gitter. Also, make sure to use GitHub flavored Markdown to make your code easier to read.
U return a string instead of a number.
This comment has been hidden.
You're not returning a number, but a string.
What about the pending translation?
bkaes (below) was able to solve the translation issue by forking it. If you can do that with your coffeescript translation I'll approve it as soon as I see it
I forked it. If you approve it please take care: approve the most recent one:-) Thanks for your post.
Approved :)
Are you on Gitter ever? I am having trouble with another kata I authored, maybe you could help me with !!
Thanks for your approval. If you give me a link to your troubled kata, I will look at it... if I have time:-) Maybe you can post your trouble on https://gitter.im/Codewars/codewars.com, it happens I have a look there.
You have Haskell and Coffeescript translation pending...
Apologies, currently trying to sort through this error:
Description cannot be approved, recent changes from related record must be merged first.
Maybe you could try to change the order of approval between Haskell and CS... and post below in reply to @bkaes post (below): it is far better than I am!
Haskell translation kumited. Given the possible problems with negative numbers, I've only used positive ones (except for one test that checks
0
).It is randint(1, 10) or
~~
, your choice... I translate by hand; why is thereturn
weird? How do you do to see the CS translation? As for me I can no more see it:-( I have no negative numbers.Wrong thread. Also, I answered on your "Giacomo likes to be short" statement. And the
return
is weird because CS is a whitespace sensitive expression based language.I knew it was the wrong thread but I had no reply button in the other thread. You didn't answer: where did you see the CS translation?
On the translation page, as usual? Here's a kumite link
As usual you are right, it works with or without
return
! I could be a bit dumb-( but thanks for the link!Hey,
I'm getting a translation error: "Description cannot be approved, recent changes from related record must be merged first."
I was advised to ask you to take a look at it from your end for your Haskell translation, and see if there's anything you can do about it. If not please let me know and we will work it out, thanks!
See https://bkaestner.github.io/codewars-rules/#handling-merge-conflicts. You should be able to approve the Haskell translation now, though.
Coffeescript translation kumited. @bkaes: I also saw negative numbers but they passed without further ado:-) Were they planned? I don't think so. I don't particularly appreciate the jokes. I hope that the author will suppress them when he cleans up spelling and grammar.
I guess not. That's a JS quirk.
~~(2.5e9)
is a negative number, for example. Make sure that this isn't in your CS translation.Yes I know this JS problem and I use Math.floor but Giacomo likes to be "short".
Nah, it's just a problem of
randint(1, 10)
in this case. By the way, did you translate the CS version with some kind of automatic translation tool? The strayreturn
's are weird.Mh, for some reason I thought the trick returned negative only with much larger numbers; fixed that, thanks senpais!
What about negative numbers? Should one only use the digits or keep the sign? Should get clarified.
(Also clean up the spelling in the kata while you're at it)
Now we generate only non negative integers.
Resolved.
Python and Ruby translations submitted, if you want to approve them :)
Nice kata but not enough tests and no random tests.
thanks! added some tests, but can you suggest some documentation on how to generate random tests? i can't seem to find it.
best,
You can have a look at http://www.codewars.com/docs/kata-test-framework and see random tests in the katas you passed. Don't forget to mark the two issues as resolved once you wrote random tests:-)
Added random tests!
Good but were negative numbers planned? I think it is your "~~random", you like it "short" but too short is no good:-) If so it would be better that the author changes the description.
Apparently not.
Needs random test cases
Added random tests!