Try
Field = [ ['75'], ['95', '64'], ['17', '47', '82'], ['18', '35', '87', '10'], ['20', '04', '82', '47', '65'], ['19', '01', '23', '75', '03', '34'], ['88', '02', '77', '73', '07', '63', '67'], ['99', '65', '04', '28', '06', '16', '70', '92'], ['41', '41', '26', '56', '83', '40', '80', '70', '33'], ['41', '48', '72', '33', '47', '32', '37', '16', '94', '29'], ['53', '71', '44', '65', '25', '43', '..
numbers = { 1: 'one', 2: 'two', 3: 'three', 4: 'four', 5: 'five', 6: 'six', 7: 'seven', 8: 'eight', 9: 'nine', 10: 'ten', 11: 'eleven', 12: 'twelve', 13: 'thirteen', 14: 'fourteen', 15: 'fifteen', 16: 'sixteen', 17: 'seventeen', 18: 'eighteen', 19: 'nineteen', 20: 'twenty', 30: 'thirty', 40: 'forty', 50: 'fifty', 60: 'sixty', 70: 'seventy', 80: 'eighty', 90: 'ninety', 100: 'hundred', 1000: 'thou..
num = 1 for i in range(1000): num *= 2 res = 0 while 1: if num < 10: res += num break res += num % 10 num = num // 10 print(res) 출처 http://euler.synap.co.kr/prob_detail.php?id=16
dp = [[0] * 21 for _ in range (21)] for i in range(21): dp[i][0] = 1 dp[0][i] = 1 for i in range(1, 21): for j in range(1, 21): dp[i][j] = dp[i-1][j] + dp[i][j-1] print(dp[20][20]) 출처 http://euler.synap.co.kr/prob_detail.php?id=15
MAX = 0 cntMAX = 0 for i in range(1, 1000000): cnt = 0 temp = i N = i while 1: if N == 1: if cnt > cntMAX: MAX = temp cntMAX = cnt break if N % 2 == 0: N = N // 2 cnt += 1 else: N = 3 * N + 1 cnt += 1 print(MAX, cntMAX) 출처 http://euler.synap.co.kr/prob_detail.php?id=14