20120526, 03:47  #1 
Aug 2002
2·3·5·277 Posts 
Scratch challenge!
Pretty cool language, eh?
After solving a Project Euler problem they let you view a forum where you get to see all the neat ways to solve the problems. Our way is probably always going to be brute force. To a hammer, everything looks like a nail. To the forum: Can we solve all of Project Euler's problems in Scratch? 
20120527, 04:47  #2 
Aug 2002
2·3·5·277 Posts 
001
.

20120527, 04:48  #3 
Aug 2002
2×3×5×277 Posts 
002
.

20120527, 05:11  #4 
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 89<O<88
1110000110101_{2} Posts 
Code:
#! /usr/bin/env python3 i = 0 j = 1 tmp = 0 sum = 0 while tmp <= 4000000: tmp = i + j if tmp % 2 == 0: sum = sum + tmp # sum += temp i = j j = tmp # i, j = j, tmp print(str(sum)) How I would have done it: Code:
#! /usr/bin/env python3 sum, i, j = 0, 0, 1 while j < 4000000: if j % 2 == 0: sum += j i, j = j, i+j print(str(sum)) 
20120527, 05:18  #5 
Aug 2002
2·3·5·277 Posts 
See the attached PDF for a fancy way of doing the problem.
Edit: Um, see message #7. 
20120527, 05:36  #6  
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
10010101011100_{2} Posts 
Quote:
Let's not set up a bad example. Right! I think their hidden forum that opens after one solves a problem is very similar to the Hoff forum. Everyone wants to get in. Few do. Last fiddled with by Batalov on 20120527 at 05:57 

20120527, 05:45  #7 
Aug 2002
2076_{16} Posts 
Oops! It has been removed.
If you want to see the PDF, solve problem #2 at Project Euler. 
20120527, 05:58  #8 
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 89<O<88
3·29·83 Posts 

20120527, 10:36  #9 
"Robert Gerbicz"
Oct 2005
Hungary
2·3^{2}·83 Posts 
Solution of p9, it will take some time to solve it with (almost completely) brute force.

20120527, 16:30  #10 
Romulan Interpreter
Jun 2011
Thailand
23060_{8} Posts 
"play sound: meow!"
That is why it takes so long... 
20120527, 19:57  #11 
"Robert Gerbicz"
Oct 2005
Hungary
5D6_{16} Posts 
Solution of p6 is really fast with brute force:

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Pls Help. On one computer (Win 10), every time restart Prime95, it restarts from scratch??!!!  king  Information & Answers  4  20180214 07:49 
A CD player from scratch  Orgasmic Troll  Puzzles  31  20120912 21:47 
Cat scratch!  mfgoode  Science & Technology  0  20070608 09:05 
Need to learn how to edit, and make from scratch, NewPGen files.  jasong  Software  2  20060528 21:16 
The Program Seems to Start from Scratch Each Time I Load it  JackMama  Software  13  20021220 14:17 