#!/usr/bin/python# Filename: cat.pyimport sysdef readfile(filename): '''Print a file to the standard output.''' f = open(filename) while True: line = f.readline() if len(line) == 0: break print (line,) #
// Problem 38// 28 February 2003//// Take the number 192 and multiply it by each of 1, 2, and 3://// 192 1 = 192// 192 2 = 384// 192 3 = 576// By concatenating each product we get the 1 to 9 pandigital, 192384576. We will call 192384576 the
// Problem 23// 02 August 2002//// A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a
// Problem 39// 14 March 2003//// If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120.//// {20,48,52}, {24,45,51}, {30,40,50}//// For which value of p <= 1000, is the
// Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n).// If d(a) = b and d(b) = a, where a b, then a and b are an amicable pair and each of a and b are called amicable numbers.//// For example,
// Problem 40// 28 March 2003//// An irrational decimal fraction is created by concatenating the positive integers://// 0.123456789101112131415161718192021...//// It can be seen that the 12th digit of the fractional part is 1.//// If dn represents
// Problem 41// 11 April 2003//// We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is also prime.//// What is the largest n-digit pandigital prime
// Problem 37// 14 February 2003//// The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can work from
今天電腦換了一個新的ip地址,命令列裡輸入ipconfig,顯示ipconfig不是內部或外部命令,也不是可啟動並執行程式或批次檔於是上網百度說在環境變數配置時,path路徑缺少安裝地址 比如 C:\windows\system32,於是在path的開頭加了 C:\windows\system32;可以尋找ip地址了。之後做作業時,卻打不開eclipse軟體了。提示:error:could not open