The Project Euler thread

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • C1004A
    Banned
    • Apr 2012
    • 197

    #196
    Re: The Project Euler thread

    project euler dominated :o

    Comment

    • Reincarnate
      x'); DROP TABLE FFR;--
      • Nov 2010
      • 6332

      #197
      Re: The Project Euler thread

      lucked out getting the Perfection badge just in time... this new one is a doozy.

      Comment

      • FFR4EVA_00
        FFR Player
        • Aug 2005
        • 1770

        #198
        Re: The Project Euler thread

        383 looks easy as ****
        EDIT: as of 5:29 i have a formula for T5(5^n)
        EDIT: as of 5:38 i have a general formula for T5(n)... sorta
        EDIT: BAM

        the most coding i did was with spreadsheets and i found the answer about 2 hours from starting work on it
        Last edited by FFR4EVA_00; 05-10-2012, 03:47 PM.
        ~*~Lurkadurk - 1134-7796-6967~*~

        Comment

        • Reincarnate
          x'); DROP TABLE FFR;--
          • Nov 2010
          • 6332

          #199
          Re: The Project Euler thread

          Haven't even looked at 383 yet... tried 382 for a bit and couldn't solve it, so I took a break, haha.

          Comment

          • Reincarnate
            x'); DROP TABLE FFR;--
            • Nov 2010
            • 6332

            #200
            Re: The Project Euler thread

            Decided to try 383. Got a working approach for T5(n) very quickly but I don't think it's scalable yet

            EDIT: Figured out T5(5^n)
            Last edited by Reincarnate; 05-10-2012, 03:47 PM.

            Comment

            • iironiic
              D6 FFR Legacy Player
              FFR Simfile Author
              • Jan 2009
              • 4342

              #201
              Re: The Project Euler thread

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

              Comment

              • Reincarnate
                x'); DROP TABLE FFR;--
                • Nov 2010
                • 6332

                #202
                Re: The Project Euler thread

                Just gotta knock back 382 and that's that
                Not really a fan of recurrence-relation problems but meh

                Comment

                • Reincarnate
                  x'); DROP TABLE FFR;--
                  • Nov 2010
                  • 6332

                  #203
                  Re: The Project Euler thread

                  Weeee, got it -- 100% again

                  Comment

                  • Reincarnate
                    x'); DROP TABLE FFR;--
                    • Nov 2010
                    • 6332

                    #204
                    Re: The Project Euler thread

                    390 should be ok, but I am fearing 391. it's likely going to be brutal

                    Comment

                    • Reincarnate
                      x'); DROP TABLE FFR;--
                      • Nov 2010
                      • 6332

                      #205
                      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.

                      Comment

                      • Reincarnate
                        x'); DROP TABLE FFR;--
                        • Nov 2010
                        • 6332

                        #206
                        Re: The Project Euler thread

                        391 solved, back to 100%. That one was tricky.
                        Last edited by Reincarnate; 07-5-2012, 05:42 PM.

                        Comment

                        • Bluearrowll
                          ⊙▃⊙
                          FFR Simfile Author
                          • Nov 2007
                          • 7376

                          #207
                          Re: The Project Euler thread

                          Until 392..
                          1st in Kommisar's 2009 SM Tournament
                          1st in I Love You`s 2009 New Year`s Tournament
                          3rd in EnR's Mashfest '08 tournament
                          5th in Phynx's Unofficial FFR Tournament
                          9th in D3 of the 2008-2009 4th Official FFR Tournament
                          10th in D5 of the 2010 5th Official FFR Tournament
                          10th in D6 of the 2011-2012 6th Official FFR Tournament

                          FMO AAA Count: 71
                          FGO AAA Count: 10

                          Bluearrowll = The Canadian player who can not detect awkward patterns. If it's awkward for most people, it's normal for Terry. If the file is difficult but super straight forward, he has issues. If he's AAAing a FGO but then heard that his favorite Hockey team was losing by a point, Hockey > FFR
                          PS: Cool AAA's Terry
                          - I Love You


                          An Alarm Clock's Haiku
                          beep beep beep beep beep
                          beep beep beep beep beep beep beep
                          beep beep beep beep beep
                          - ieatyourlvllol

                          Comment

                          • Choofers
                            FFR Player
                            FFR Music Producer
                            • Dec 2008
                            • 6205

                            #208
                            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.
                            Last edited by Choofers; 07-26-2012, 02:32 PM.

                            Comment

                            • Choofers
                              FFR Player
                              FFR Music Producer
                              • Dec 2008
                              • 6205

                              #209
                              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.

                              Comment

                              • Reincarnate
                                x'); DROP TABLE FFR;--
                                • Nov 2010
                                • 6332

                                #210
                                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

                                Comment

                                Working...