內容 : 正體->简体
小玫,小熊跟小羊正在玩闖關遊戲,這關要摧毀101大樓,前提就是要算出一個很長很長的數,也就是過關密碼。
其中小熊經由秘密管道得知,這個數就是 1! * 2! * 3! * ......... * 100!,
小玫負責算出這個數,可是因為這個數實在太長了,因此小玫算的好累好累。
現在小羊想要請你幫忙,你可以輸出 "我不想幫忙" (不含引號) 接著得到WA ,或是正確輸出這關的過關密碼,得到AC。
(因為台北101很高很高,所以你輸出的解答也必須每輸出一個數字後換一行。)
PS.姓名純屬杜撰,如有雷同純屬巧合。
(測資已更正...不好意思XDD)
輸入說明 :
本題沒有輸入。
輸出說明 :
請輸出一個很像答案的東西。
範例輸入 :
輸入範例要很有智慧的國王才能看到。
範例輸出 :
只可意會不可言傳。
27031768576517499710558090027596232298558093274311372898878080715359180165112031924307456158465248372818779651925195472427213190430183251693103019318689675406431463633656595635631244531823489545981465006345769477538600353418733645868065010408042273812281857257966951771254299784907532174172675261042904443735033006827062367781734932402906380064676556914853300117738454029138584114653641460999879297110724828557836146051273563518529674565773200721055678644025614623883481237564894628859759852397473591728651044381377039700592548741212705965716337933203079627369262097142940670258319115410419017088642085963216664587687528552214188386047097748341347826082492672575871916359724288832957423130960163446577201297030081036819556978682525116845551863481353447203913609105954470434446731819716372893950027080537765260387886497487073911883337335888163296120860592970129474414820716186242361113598851877430679053185302290711367100692138119365535749612397812211870895421300661971739287030299385145794712666816403151658293555299062759180558560552120065733359856424513710950255600515309069234761024080315083912936880059543194196967002775057391143932519178064644929561934170700017725794749065783536604869532972216729771869515017257460764744205293736768850910844817317789760525673651462286969218051912783040803173502868593343019986651928862849866171306355901727590395083666710708634298268397991417237719829352705000018716698883171120848588655798456188752317306393075998430051287601872760427292416532717472158265481963073016090468249993686882132992251314931844377812625324873058388685195527407737891867473352727111550336196454202887299904847
回覆刪除977654010329650747012142143741017027453376146831338455608413252873927221734647038025714766776152183177488678194636943158142340296086335991741911641667613321461943638112546539425512207317045203125627265020059235448422648841292646425006201044185684862105574726995305031507541549370568722402791853420112332280884916208713251458554365777660881201931186067005132165233655598425788277533501182142243518492318915243674651098579717309036232009017377276100301318939920488590557304532679074461755717921612389995344071844739703234571919956632808014778170148649586922770228743618307005560442586998801940863559279122530838019077280335769900574987670735637822874692583734728992996828693947342462932456573689525150423690989405096473576984685941021091436123576026674956266343311999686469250683711889792780188010000923545083693616512431299553430423319151799092729329012624791942408482551216422936654620389588409307856471553255459174209488541720797724764392878940295153125139426917844348014324717101712239948275911331451350625503079913906081322162453194924075795374300445602930241718494950581280344647070513379468660018749666766779337982714307918578490651858623155531753436341939230313716211088205653758803856211424511942446178616123919632158681209340766264843607918190711195995769497888074300126090980893407856203416039961905820434437338769169809988554940514984940771883510669335922159652260943495403914082335901654803300716357423311007672070947856937614612334402545577731613545588875133756028002253392612525017882998610886274897113627550258742450493613087049732151945364827840949182968966809157600659099420832959762977348556400332795733357668875671701282089323748550442476412406932391110882062739962652502438287501079688573633998658498932012042386086426239238190775121738551066893598665935774455519152157588419955426909632953255225944147546866926742646430035992755353833768063541782684251337
回覆刪除8094196026084771146435066774964799840510519597652773438152490596634012188249819523969133086597657206983349971964696421146057847976505094264572204953040671741655457660106329639219303949232756258789192510477013124310160238677812109077054703910643754934164310735372104825239197655045027533293444926202961463847359407615889974303054554470962079373913090744486888926664916708917091558228008929019295667791396844335022274762740195153708948876648089296865186747554920886900705638554615222948181472438037649540053669840530068127131126032909944816787535722142055394929041165731570535386655420294861970037574826628300621206354569602763913115960484478138992848828625560312982647976823735566284446196426533243288567678948483034140661619769481554492209880758513751326398774755109237791432074048823410988991352369647941838207035070662678009737924321112457843810864620143991549072684427654737832912789524340150251956995806594657034260765963379026299342396813430279649000726537103228322922274301618581208301765561446392193493904232903108740309423206747998548157751484010320114148533813415226163426714808922805414826727726917152379144277325295139732276855601024241947753005656605225201591970403152562112730817655201188689350239567000979255537747478112682709916534868954877256632775752861030509773615848960062886356692101512644449727093705724810755090700298750711851605291116212521422026733383055503601920709330306513440378031666819256691846689445928590496694281474384613130196072910335628851658625694790272152049387982349837780381922503577826702544753164886750394867878359662355724507775936174257950055893717915843378128752846311597289367564887789542105076003313111514940527611559574576460920039759071614340469533146367249323666949235866009567675661746881544987555182
回覆刪除40131330852927788405108316860839524389146592070352766013263554814855316560483930269161109555115598599074606380419346706281687122756139236272334874636515742846732426249189295294126077183180386537628070577304431955113672644964908191966909764383915898083967352765907114405625567363146867872227797114185869379776838512786074844136826333346246190407373179258963078361749956016699370455403337036996087663326855986830350259733163563156748953918413646360740820773135517701577617129511847665900751779813170899517926423297750920427028974700540224251803798780700829498972359884800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
回覆刪除答案 是 上面4個留言 的所有數字>>多阿!
回覆刪除等了 2分鐘左右!!
Dim aa(1000) As Integer
回覆刪除Dim bb(1000) As Integer
Dim cc(1000) As Integer
Dim c As String
Private Sub Form_Load()
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
k = "1"
For i = 1 To 100
a = 1
For j = 2 To i
t = j
a = myfold(a, t, 1)
Next j
If Len(a) = 1 Then
k = myfold(k, a, 1)
Else
kk = ""
For q = Len(a) To 1 Step -1
p = Mid(a, q, 1)
' k = myadd(myfold(a, t, Len(b) - i + 1), k)
kk = myadd(myfold(k, p, Len(a) - q + 1), kk)
Next q
k = kk
End If
Next i
Print #2, k
Close #1
Close #2
End Sub
Public Function myadd(a, b) As String
Dim c As String, q1 As Integer, q2 As Integer, nt As Integer
nt = 0: c = ""
If Len(a) < Len(b) Then
Min = Len(a): Max = Len(b): k = b
Else
Min = Len(b): Max = Len(a): k = a
End If
For i = 1 To Min
q1 = Mid(a, Len(a) - i + 1, 1)
q2 = Mid(b, Len(b) - i + 1, 1)
c = ((q1 + q2 + nt) Mod 10) & c
nt = (q1 + q2 + nt) \ 10
Next i
If nt > 0 Then
If Max = Min Then
myadd = nt & c
Else
myadd = myadd(Left(k, Max - Min), nt) & c
End If
Else
If Max = Min Then
myadd = c
Else
myadd = Left(k, Max - Min) & c
End If
End If
End Function
Public Function myfold(a, t, o) As String
Dim c As String
Dim q As Long
For i = Len(a) To 1 Step -1
q = Mid(a, i, 1) * t
c = ((q + nt) Mod 10) & c
nt = (q + nt) \ 10
Next i
If nt <> 0 Then c = nt & c
Do Until o <= 1
c = c & "0"
o = o - 1
Loop
myfold = c
End Function
驚人的答案= ="
第二版
回覆刪除Dim aa(1000) As Integer
Dim bb(1000) As Integer
Dim cc(1000) As Integer
Dim c As String
Private Sub Form_Load()
k = "1"
For i = 1 To 10
a = 1
For j = 2 To i
a = myfold(a, j)
Next j
k = myfold(a, k)
Next i
Print k
End Sub
Public Function myadd(a, b) As String
Dim c As String, q1 As Integer, q2 As Integer, nt As Integer
nt = 0: c = ""
If Len(a) < Len(b) Then
Min = Len(a): Max = Len(b): k = b
Else
Min = Len(b): Max = Len(a): k = a
End If
For i = 1 To Min
q1 = Mid(a, Len(a) - i + 1, 1)
q2 = Mid(b, Len(b) - i + 1, 1)
c = ((q1 + q2 + nt) Mod 10) & c
nt = (q1 + q2 + nt) \ 10
Next i
If nt > 0 Then
If Max = Min Then
myadd = nt & c
Else
myadd = myadd(Left(k, Max - Min), nt) & c
End If
Else
If Max = Min Then
myadd = c
Else
myadd = Left(k, Max - Min) & c
End If
End If
End Function
Public Function myfold(a, b) As String
Dim k As Integer
For i = Len(b) To 1 Step -1
t = Mid(b, i, 1)
For j = Len(a) To 1 Step -1
k = Len(a) - j + Len(b) - i
r = Mid(a, j, 1)
n = t * r
Do Until k <= 0
n = n & "0"
k = k - 1
Loop
ln = myadd(n, ln)
Next j
Next i
myfold = ln
End Function
BY ㄚ揚
阿揚好,
回覆刪除第二版很清楚,很好。
繼續往減法和除法吧。