[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
I can't figure out what's wrong, can somebody help?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 10
Thread images: 1
File: qsq.png (286 KB, 1920x1080) Image search: [Google]
qsq.png
286 KB, 1920x1080
I can't figure out what's wrong, can somebody help?
problem 17 on projecteuler
>>
>>54505833
There should be color options, you're gonna want to set the background field to ffffff
>>
>>54505869
my background goes well with the preset colors, so no
can you help me
>>
I just solved this with a pen and paper; it's pretty easy if you group things right. Just note that its 'forty' not 'fourty'. That wasted about 30 minutes of my time lol
>>
>>54505833
Why don't you start by explaining why you think your program is wrong?
>>
>>54505943
it doesn't give the right answer

I've tried some sample inputs and they're all correct

but it still gives wrong output
>>
>the output says n "words"
Is that a typo or are you counting words? You should count chars

>you're typing "forty" but using "and" in the hundreds
Project Euler says that "and" is valid for British English so you may want to change forty to fourty or remove the ands.
>>
>>54505993
yeah, it's a typo
let me try with fourty
but I doubt it since their example spells "forty"
>>
I'll try not to spoil the answer too much.

You are somehow most likely counting the word "hundred" twice. This is because the difference from your answer and the right one is exactly the number of characters of all the "hundred"s.
>>
SOMEBODY HALP
Thread replies: 10
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.