Go Back   Flash Flash Revolution > General Discussion > Technology
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
Old 06-8-2014, 07:44 PM   #361
Reincarnate
x'); DROP TABLE FFR;--
Retired StaffFFR Veteran
 
Reincarnate's Avatar
 
Join Date: Nov 2010
Posts: 6,332
Default Re: The Project Euler thread

In Python though yes
Reincarnate is offline   Reply With Quote
Old 06-8-2014, 09:20 PM   #362
Reincarnate
x'); DROP TABLE FFR;--
Retired StaffFFR Veteran
 
Reincarnate's Avatar
 
Join Date: Nov 2010
Posts: 6,332
Default Re: The Project Euler thread

Son of a...

Just solved problem 88, but it is tricky to get in decent runtime. Right now my best is only 14s. :(

EDIT: Oh FFS I am an idiot... much faster way to do this.

EDIT: 0.2 seconds -- can't believe I didn't do this in the first place.


EDIT:

Total time for problems 1 through 90: 28.940158 seconds

Last edited by Reincarnate; 06-8-2014 at 11:13 PM..
Reincarnate is offline   Reply With Quote
Old 06-8-2014, 11:45 PM   #363
Reincarnate
x'); DROP TABLE FFR;--
Retired StaffFFR Veteran
 
Reincarnate's Avatar
 
Join Date: Nov 2010
Posts: 6,332
Default Re: The Project Euler thread

Up to Problem 96, aaaghghghgh Sudoku. Nope. Bedtime

edit: (jk 97, 99, and 100 are quickfodder -- 96 and 98 can diaf)

edit: actually 98 isn't horrible either

edit: GAURUATUGH FINE I'LL DO SUDOKU. :( going to write the most fucking messiest code in the universe

edit: Yay, first 100 down

Last edited by Reincarnate; 06-9-2014 at 01:01 AM..
Reincarnate is offline   Reply With Quote
Old 06-9-2014, 01:02 AM   #364
leonid
I am leonid
Retired StaffFFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
leonid's Avatar
 
Join Date: Oct 2008
Location: MOUNTAIN VIEW
Age: 34
Posts: 8,080
Default Re: The Project Euler thread



really tough
__________________



Proud member of Team No
leonid is offline   Reply With Quote
Old 06-9-2014, 01:10 AM   #365
Reincarnate
x'); DROP TABLE FFR;--
Retired StaffFFR Veteran
 
Reincarnate's Avatar
 
Join Date: Nov 2010
Posts: 6,332
Default Re: The Project Euler thread

nice one, leonid








EDIT:
Total time for problems 1 through 100: 32.591266 seconds

Code:
Problem 1 in 0.000006 s
Problem 2 in 0.000009 s
Problem 3 in 0.000562 s
Problem 4 in 0.295742 s
Problem 5 in 0.000037 s
Problem 6 in 0.000004 s
Problem 7 in 0.018113 s
Problem 8 in 0.010010 s
Problem 9 in 0.000072 s
Problem 10 in 0.427023 s
Problem 11 in 0.002001 s
Problem 12 in 0.353162 s
Problem 13 in 0.000264 s
Problem 14 in 2.009820 s
Problem 15 in 0.000026 s
Problem 16 in 0.000260 s
Problem 17 in 0.001162 s
Problem 18 in 0.000439 s
Problem 19 in 0.003114 s
Problem 20 in 0.000137 s
Problem 21 in 0.121356 s
Problem 22 in 0.014946 s
Problem 23 in 0.638417 s
Problem 24 in 0.124795 s
Problem 25 in 0.035268 s
Problem 26 in 0.013433 s
Problem 27 in 0.000009 s
Problem 28 in 0.000007 s
Problem 29 in 0.017878 s
Problem 30 in 1.653687 s
Problem 31 in 0.002773 s
Problem 32 in 0.481344 s
Problem 33 in 0.000229 s
Problem 34 in 0.227541 s
Problem 35 in 0.462930 s
Problem 36 in 0.519228 s
Problem 37 in 0.251382 s
Problem 38 in 0.001300 s
Problem 39 in 0.000364 s
Problem 40 in 0.000044 s
Problem 41 in 0.001595 s
Problem 42 in 0.004338 s
Problem 43 in 0.049111 s
Problem 44 in 0.271455 s
Problem 45 in 0.018607 s
Problem 46 in 0.012878 s
Problem 47 in 0.072932 s
Problem 48 in 0.003445 s
Problem 49 in 0.485125 s
Problem 50 in 0.197839 s
Problem 51 in 0.238479 s
Problem 52 in 0.641779 s
Problem 53 in 0.002342 s
Problem 54 in 0.067815 s
Problem 55 in 0.077687 s
Problem 56 in 0.414760 s
Problem 57 in 0.000912 s
Problem 58 in 0.293105 s
Problem 59 in 0.002044 s
Problem 60 in 5.083650 s
Problem 61 in 0.002605 s
Problem 62 in 0.045824 s
Problem 63 in 0.000028 s
Problem 64 in 0.242403 s
Problem 65 in 0.000090 s
Problem 66 in 0.032540 s
Problem 67 in 0.005123 s
Problem 68 in 0.040291 s
Problem 69 in 0.000160 s
Problem 70 in 0.790107 s
Problem 71 in 0.000006 s
Problem 72 in 0.062803 s
Problem 73 in 0.019348 s
Problem 74 in 1.181639 s
Problem 75 in 0.745507 s
Problem 76 in 0.070708 s
Problem 77 in 0.021643 s
Problem 78 in 6.514026 s
Problem 79 in 0.000227 s
Problem 80 in 0.007928 s
Problem 81 in 0.007150 s
Problem 82 in 0.010406 s
Problem 83 in 0.131738 s
Problem 84 in 0.001178 s
Problem 85 in 0.002586 s
Problem 86 in 1.702908 s
Problem 87 in 0.464952 s
Problem 88 in 0.270735 s
Problem 89 in 0.002017 s
Problem 90 in 0.075457 s
Problem 91 in 0.008651 s
Problem 92 in 0.207911 s
Problem 93 in 0.270968 s
Problem 94 in 0.000015 s
Problem 95 in 3.656271 s
Problem 96 in 0.216058 s
Problem 97 in 0.000015 s
Problem 98 in 0.147458 s
Problem 99 in 0.002978 s
Problem 100 in 0.000015 s

Total time for problems 1 through 100: 32.591266 seconds

Last edited by Reincarnate; 06-9-2014 at 01:17 AM..
Reincarnate is offline   Reply With Quote
Old 06-9-2014, 10:59 PM   #366
leonid
I am leonid
Retired StaffFFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
leonid's Avatar
 
Join Date: Oct 2008
Location: MOUNTAIN VIEW
Age: 34
Posts: 8,080
Default Re: The Project Euler thread



OMG finally.
__________________



Proud member of Team No
leonid is offline   Reply With Quote
Old 06-9-2014, 11:35 PM   #367
leonid
I am leonid
Retired StaffFFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
leonid's Avatar
 
Join Date: Oct 2008
Location: MOUNTAIN VIEW
Age: 34
Posts: 8,080
Default Re: The Project Euler thread

Wish people read my posts because I take extra time refining my code and explanations

As of now most of the posts I've made recently are still the very last post of each thread
__________________



Proud member of Team No
leonid is offline   Reply With Quote
Old 06-10-2014, 12:19 AM   #368
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default Re: The Project Euler thread

I read them

I just don't have much to say lol
__________________
Rhythm Simulation Guide
Comments, criticism, suggestions, contributions, etc. are all welcome.

Piano Etude Demon Fire sheet music
stargroup100 is offline   Reply With Quote
Old 06-10-2014, 12:22 AM   #369
leonid
I am leonid
Retired StaffFFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
leonid's Avatar
 
Join Date: Oct 2008
Location: MOUNTAIN VIEW
Age: 34
Posts: 8,080
Default Re: The Project Euler thread

I'm talking about my posts in the euler problem threads btw, not this thread
__________________



Proud member of Team No
leonid is offline   Reply With Quote
Old 06-10-2014, 02:39 AM   #370
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default Re: The Project Euler thread

OHHH

yeah it kinda sucks, cause nobody reads past the first three posts, let alone the first page
__________________
Rhythm Simulation Guide
Comments, criticism, suggestions, contributions, etc. are all welcome.

Piano Etude Demon Fire sheet music
stargroup100 is offline   Reply With Quote
Old 06-10-2014, 09:13 AM   #371
rushyrulz
Digital Dancing!
Retired StaffFFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
rushyrulz's Avatar
 
Join Date: Feb 2006
Location: 80 billion club, NE
Age: 31
Posts: 12,980
Default Re: The Project Euler thread

Quote:
Originally Posted by Problem 23
As 12 is the smallest abundant number, 1 + 2 + 3 + 4 + 6 = 16, the smallest number that can be written as the sum of two abundant numbers is 24. By mathematical analysis, it can be shown that all integers greater than 28123 can be written as the sum of two abundant numbers. However, this upper limit cannot be reduced any further by analysis even though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit.
Finished problem 23 and it was an efficiency nightmare (i shud lrn 2 code b4tr)

Why do they pick 28,123 when the same is true for all numbers greater than 20,161?
__________________


rushyrulz is offline   Reply With Quote
Old 06-10-2014, 01:41 PM   #372
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default Re: The Project Euler thread

Quote:
Originally Posted by rushyrulz View Post
Finished problem 23 and it was an efficiency nightmare (i shud lrn 2 code b4tr)

Why do they pick 28,123 when the same is true for all numbers greater than 20,161?
I'm assuming this means that through conceptual analysis and proof, the lowest limit we can reduce down to is 28123. Even though the true limit is lower, this is the smallest upper bound we can actually prove in this way. If this is really true, I'm sure it's very well defined what they mean by "reduced any further by analysis". Clearly, brute force testing with a computer doesn't count.

Unless you're asking why the problem writer chose to use that number specifically, in which case I don't know and it's really the writer's free choice. Perhaps he just simply wanted an excuse to use larger numbers, despite the small increase. It does kinda make sense though; once you find the limit of your hand analysis, you have no choice but to use a computer, and only then can you reduce that limit. The problem probably wants to demonstrate an example of this.

I just tried this on my own and the 28123 limit is actually pretty easy to prove, and I really do have no idea how to get this down any lower.
__________________
Rhythm Simulation Guide
Comments, criticism, suggestions, contributions, etc. are all welcome.

Piano Etude Demon Fire sheet music

Last edited by stargroup100; 06-10-2014 at 01:54 PM..
stargroup100 is offline   Reply With Quote
Old 06-10-2014, 03:47 PM   #373
Reincarnate
x'); DROP TABLE FFR;--
Retired StaffFFR Veteran
 
Reincarnate's Avatar
 
Join Date: Nov 2010
Posts: 6,332
Default Re: The Project Euler thread

Quote:
Originally Posted by leonid View Post
Wish people read my posts because I take extra time refining my code and explanations

As of now most of the posts I've made recently are still the very last post of each thread
I read them all (I scroll through the problem listings from time to time and check out new posts).

I just don't have much to add because I don't find those problems as interesting as some of the harder ones.

A comment though, I'm surprised about your approach to 181. That problems seems like it would have been really easy for you to hammer out and execute in quick runtime.


edit: Stargroup: Yes that's right -- in practice it's lower but the limit is analytically provable. Here is the proof: http://mathschallenge.net/full/sum_o...undant_numbers

Last edited by Reincarnate; 06-10-2014 at 04:02 PM..
Reincarnate is offline   Reply With Quote
Old 06-10-2014, 05:22 PM   #374
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default Re: The Project Euler thread

oh shit that's the method I came up with LOL
__________________
Rhythm Simulation Guide
Comments, criticism, suggestions, contributions, etc. are all welcome.

Piano Etude Demon Fire sheet music
stargroup100 is offline   Reply With Quote
Old 06-10-2014, 06:40 PM   #375
rushyrulz
Digital Dancing!
Retired StaffFFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
rushyrulz's Avatar
 
Join Date: Feb 2006
Location: 80 billion club, NE
Age: 31
Posts: 12,980
Default Re: The Project Euler thread

fair enough
__________________


rushyrulz is offline   Reply With Quote
Old 06-11-2014, 06:48 AM   #376
leonid
I am leonid
Retired StaffFFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
leonid's Avatar
 
Join Date: Oct 2008
Location: MOUNTAIN VIEW
Age: 34
Posts: 8,080
Default Re: The Project Euler thread



Literally took me 3 minutes to solve
Now I ran out of easy problems
__________________



Proud member of Team No
leonid is offline   Reply With Quote
Old 06-11-2014, 07:42 AM   #377
rushyrulz
Digital Dancing!
Retired StaffFFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
rushyrulz's Avatar
 
Join Date: Feb 2006
Location: 80 billion club, NE
Age: 31
Posts: 12,980
Default Re: The Project Euler thread



first one that I actually used pencil and paper for.
__________________


rushyrulz is offline   Reply With Quote
Old 06-11-2014, 09:52 AM   #378
leonid
I am leonid
Retired StaffFFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
leonid's Avatar
 
Join Date: Oct 2008
Location: MOUNTAIN VIEW
Age: 34
Posts: 8,080
Default Re: The Project Euler thread



woot
__________________



Proud member of Team No
leonid is offline   Reply With Quote
Old 06-13-2014, 06:47 PM   #379
leonid
I am leonid
Retired StaffFFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
leonid's Avatar
 
Join Date: Oct 2008
Location: MOUNTAIN VIEW
Age: 34
Posts: 8,080
Default Re: The Project Euler thread



Easy

A question... Isn't problem 266 a 2-partition problem (NP-complete)?
I don't see any way other than having to run an exponential (or pseudo-polynomial) runtime algorithm that takes ages to finish
__________________



Proud member of Team No
leonid is offline   Reply With Quote
Old 06-13-2014, 08:15 PM   #380
Reincarnate
x'); DROP TABLE FFR;--
Retired StaffFFR Veteran
 
Reincarnate's Avatar
 
Join Date: Nov 2010
Posts: 6,332
Default Re: The Project Euler thread

There is a way

Every single problem gets tested against the minute-rule before release.

Problem 266 is doable in a lot less time than that, even
Reincarnate is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 12:50 AM.


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