• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Stage 2 solver

ossifrage Apr 25th, 2015 243 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. # /* http://puzzling.stackexchange.com/q/12624/40 */
2.
3. f = [ [ [500, 10,530,456, 25,170,180,160,110,400],
4.         [100, 60,410,250,470, 50, 60, 20, 45, 50],
5.         [ 25, 40,240,160, 16,125,280,120,200,580],
6.         [ 90, 32, 23, 40,105, 20,320,170,250,140],
7.         [125, 80,360,240,480, 55,170,450, 32,410] ],
8.       [ [ 60, 20, 61,500, 61, 10,565,200,440, 60,113,350,500,290, 61],
9.         [220,100, 84,425,220,113,120,180,360,425, 20, 90, 25, 50,452],
10.         [ 61,226, 10, 50,170, 25, 20,360, 25,540, 50,140,226, 60, 10],
11.         [120,565, 61,113, 60,100,425, 61,452, 84,500, 18,565,100,113],
12.         [ 84,440,360,540,340,452,226,404, 20,360,220,540,120, 84,360] ],
13.       [ [260,232,190, 60, 20,100,220],
14.         [120,110,423,150,550,120, 55],
15.         [125,275, 25,520, 22,250, 44],
16.         [ 60, 50,260,128,440,407,180],
17.         [ 46,500,180,120,590, 90,494] ],
18.       [ [150, 23,202, 46,443,260, 25, 82,460],
19.         [115,260, 20,210,230,120,115,360, 92],
20.         [ 50,320, 46,180,575,479, 30, 10,150],
21.         [210,375,150,124, 82,320,520, 92,260],
22.         [180,220,260,120,210,220,103,100,320] ] ]
23.
24. nums = [ 4000,11300,5500,2300 ]
25.
26. def solve():
27.     for i in range(4):
28.         n = nums[i]
29.         for row in f[i]:
30.             print ''.join(['#.'[(n % x)>0] for x in row])
31.         print
32.
33. solve()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top