|
ゴンとも |
|
#53933
>このプログラムは12限定だったんですが他のものもでるものを今から >考えたいんですが眠くて・・・ 以下の29までのものは押してすぐなんですが 100ぐらいはどのくらいかかるかは? やってみればわかるんですが・・・ input n print time$ for a=0 to n/2 for b=0 to n/3 for c=0 to n/5 for d=0 to n/7 for e=0 to n/11 for f=0 to n/13 for g=0 to n/17 for h=0 to n/19 for i=0 to n/23 for j=0 to n/29 IF 2*a+3*b+5*c+7*d+11*e+13*f+17*g+19*h+23*i+29*j=n THEN LET s=s+1 next j next i next h next g next f next e next d next c next b next a PRINT s PRINT TIME$ END |
|
豊川市
4月24日(木) 1:11:11
53934 |