for b in range(1,5): for s in range (1,5): for g in range (1,5): if b!=s and b!=g and s!=g: print b,s,g //=======================================================# -*- coding:utf-8 -*-sums=0.0money=0.0money=raw_input("輸入獎金:")# print "hello.%s"% moneymoney=int(money)if money<=10: sums=money*0.1elif money>10 and money <=20: sums=1+(money-10)*0.075elif money>20 and money <=40: sums=1.75+(money-20)*0.05elif money>40 and money <=60: sums=2.75+(money-40)*0.03elif money>60 and money <=100: sums=3.35+(money-60)*0.015else: sums=3.95+(money-100)*0.01print "應發獎金為:"+ bytes(sums)# -*- coding:utf-8 -*-sums=0.0money=0.0money=raw_input("輸入獎金:")# print "hello.%s"% moneymoney=int(money)if money<=10: sums=money*0.1elif money>10 and money <=20: sums=1+(money-10)*0.075elif money>20 and money <=40: sums=1.75+(money-20)*0.05elif money>40 and money <=60: sums=2.75+(money-40)*0.03elif money>60 and money <=100: sums=3.35+(money-60)*0.015else: sums=3.95+(money-100)*0.01print "應發獎金為:%f" % sums//===================================================================from math import sqrtfor i in range(9999999): temp=i+100 temp2=int(sqrt(temp)) if temp2*temp2==temp: temp=i+268 temp2=int(sqrt(temp)) if temp2*temp2==temp: print i//=========================================================================print(" ***** ")print(" ** ")print(" ** ")print(" ** ")print(" ** ")print(" ***** ")//======================================================================/*按公式PI/2 = ∑ (n! / (2n+1)!!) 計算Pi計算2800項就可以精確到小數點後800位*/#include "stdio.h"long b,c,d,e,f[2801];int main(){ int i; for (i = 0; i < 2800; i++) { f[i] = 2000; } f[2800] = 0; for (c = 2800; c > 0; c -= 14) { d = 0; for (b = c; b > 0; b--) { d =d+ f[b] * 10000; f[b] = d % (2*b-1); d =d/(2*b-1); if (b > 1) d=d*(b-1); } printf("%.4d", e + d / 10000); e = d % 10000; } return 0;}