1. Список говнокодов пользователя htoto1

    Всего: 1

  2. Python / Говнокод #3793

    −168

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    piarra=[3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3, 3, 8, 3, 2, 7, 9, 5, 0, 2, 8, 8, 4, 1, 9, 7, 1, 6, 9, 3, 9, 9, 3, 7, 5, 1, 0, 5, 8, 2, 0, 9, 7, 4, 9, 4, 4, 5, 9, 2, 3, 0, 7, 8, 1, 6, 4, 0, 6, 2, 8, 6, 2, 0, 8, 9, 9, 8, 6, 2, 8, 0, 3, 4, 8, 2, 5, 3, 4, 2, 1, 1, 7, 0, 6, 7, 9]
    piarrb=[3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3, 3, 8, 3, 2, 7, 9, 5, 0, 2, 8, 8, 4, 1, 9, 7, 1, 6, 9, 3, 9, 9, 3, 7, 5, 1, 0, 5, 8, 2, 0, 9, 7, 4, 9, 4, 4, 5, 9, 2, 3, 0, 7, 8, 1, 6, 4, 0, 6, 2, 8, 6, 2, 0, 8, 9, 9, 8, 6, 2, 8, 0, 3, 4, 8, 2, 5, 3, 4, 2, 1, 1, 7, 0, 6, 7, 9]
    
    result = []
    for i in range(len(piarra)**2):
    	result.append(0)
    
    def decr(a):
    	if a[-1]>0:
    		a[-1]-=1
    	else:
    		a.pop()
    		decr(a)
    		a.append(9)
    		if a[0]==0:
    			a.remove(0)
    		
    while piarra != [0]:
    	decr(piarra)
    	for i in range(len(piarrb)):
    		result[-1-i]+=piarrb[-1-i]
    	while(sorted(result)[-1]>9):
    		for i in range(len(result)):
    			if result[i]>9:
    				result[i]-=10
    				result[i-1]+=1
    				
    while result[0]==0:
    	result.remove(0)
    	
    sqrstr=''
    for i in result:
    	sqrsrt+=`i`
    print sqrstr

    Пи в квадрате. Оцените нетривиальность решений.

    htoto1, 27 Июля 2010

    Комментарии (6)