Flash Flash Revolution: Community Forums

Flash Flash Revolution: Community Forums (http://www.flashflashrevolution.com/vbz/index.php)
-   Technology (http://www.flashflashrevolution.com/vbz/forumdisplay.php?f=74)
-   -   The Project Euler thread (http://www.flashflashrevolution.com/vbz/showthread.php?t=120818)

iironiic 05-10-2012 06:22 PM

Re: The Project Euler thread
 
I'm working on 383 too. I got a formula for f5(n!) but nothing for T5(n) yet :(

Reincarnate 05-11-2012 01:15 AM

Re: The Project Euler thread
 
Just gotta knock back 382 and that's that
Not really a fan of recurrence-relation problems but meh

Reincarnate 05-30-2012 06:46 PM

Re: The Project Euler thread
 
Weeee, got it -- 100% again


Reincarnate 06-21-2012 01:05 AM

Re: The Project Euler thread
 
390 should be ok, but I am fearing 391. it's likely going to be brutal

Reincarnate 07-1-2012 04:42 PM

Re: The Project Euler thread
 
I've got a program that will solve for M(n) but is not scalable to higher levels

You know it's a tough problem when very few of the usual heavy hitters have solved it, even 24 hours after its release.

Reincarnate 07-5-2012 12:34 AM

Re: The Project Euler thread
 
391 solved, back to 100%. That one was tricky.

Bluearrowll 07-5-2012 08:20 PM

Re: The Project Euler thread
 
Until 392..

Choofers 07-26-2012 04:25 PM

Re: The Project Euler thread
 
So I'm teaching myself BASIC and I figure that this would be a good way to learn
Unfortunately, I can't even solve problem 1 because I'm a dumb shit rofl (I could solve on paper, but that'd take forever)

There's something wrong with my code.
Don't hate, I haven't touched a programming language since high school (so 2008)

Code:

count = 0
addNumber = 0
a$ = ""

[loop]
count = count + 1
if (count mod 3 = 0) or (count mod 5 = 0) then
addNumber = addNumber + count
print "Count = "; count
print "addNumber ="; addNumber
else
print "Count = "; count
print "addNumber ="; addNumber
end if

if count < 1000 then
goto [loop]
else
print addNumber
end if
stop



Some info regarding my code:
The a$ was a variable I used to make the code stop during the first if-then statement. It originally looked like this:
Code:

print "Count = "; count
print "addNumber ="; addNumber
print "press any button and enter to continue"
input a$
else

I know using goto makes me look like a newb programmer, but that's fine. I'm not too keen on streamlining my code just yet.

Choofers 07-26-2012 04:57 PM

Re: The Project Euler thread
 
Shit, I think I know what's wrong with my code. 2 mod 3 would end being 0. So it's adding to addNumber before it should be.

Reincarnate 07-26-2012 10:25 PM

Re: The Project Euler thread
 
2 mod 3 is 2

(x mod y is the remainder of x / y)

PS use Python instead, it's cooler



sumTotal = 0
num = 1
while num < 1000:
if (num % 3 == 0) or (num % 5 == 0):
sumTotal = sumTotal + num
num = num + 1
print sumTotal


Damn thing doesn't save formatting but w/e

Choofers 07-27-2012 03:46 PM

Re: The Project Euler thread
 
I am obviously retarded, because I'm still stuck on problem 1. I mirrored that code into BASIC (took me a bit to figure out while loops), and now I'm getting a huge number, literally twice as large as my original code. I downloaded Python though, let's see how that goes.

ugh I can't wait to go back to school rofl

edit: python's gay, going back to BASIC

leonid 07-27-2012 03:56 PM

Re: The Project Euler thread
 
ur gay

Choofers 07-27-2012 03:58 PM

Re: The Project Euler thread
 
thank you for your help

edit: Took a break from problem 1 and went onto a random problem under 10. Solved 6 after a bit of trouble, I was finding the difference for the first 1000 natural numbers and not 100. Whoops.

Reincarnate 07-27-2012 08:28 PM

Re: The Project Euler thread
 
What is your current code for problem 1

and seriously stop using BASIC, aaaaoooogugughghhh

Choofers 07-27-2012 11:16 PM

Re: The Project Euler thread
 
whats wrong with basic rofl, I download python 2.whatever and wanted to kill the lady making my chai latte.

I'll post my code tonight after I mess with it a bit.

Choofers 08-12-2012 07:21 AM

Re: The Project Euler thread
 
I actually never touched my code that night...

i touched myself.................

Reincarnate 11-17-2012 12:42 AM

Re: The Project Euler thread
 
Anyone else still playing any?

Eagerly awaiting #402

infinity. 11-17-2012 01:23 AM

Re: The Project Euler thread
 
i started on tuesday. i've got 17 correct answers so far, but i only know a semester's worth of python haha. the problems are starting to get out of my threshold

my account name is lpauley if you can do anything with it

infinity. 11-17-2012 01:24 AM

Re: The Project Euler thread
 
Quote:

Originally Posted by Choofers (Post 3734304)
whats wrong with basic rofl

also

EVERYTHING

Reincarnate 11-17-2012 12:03 PM

Re: The Project Euler thread
 
You use friend codes instead of usernames


All times are GMT -5. The time now is 08:02 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution