Data update

This commit is contained in:
Ingy döt Net 2024-10-16 18:07:41 -07:00
parent 81fd053722
commit 52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions

View file

@ -1,28 +1,30 @@
Dim As Integer cocos = 11
Dim As Integer cocos, marineros, nc, s, t
For ns As Integer = 2 To 9
Dim As Integer oculta(ns)
cocos = Int(cocos / ns) * ns + 1
cocos = 11
For marineros = 2 To 9
Dim As Integer oculta(marineros)
cocos = (cocos \ marineros) * marineros + 1
Do
Dim As Integer nc = cocos
For s As Integer = 1 To ns+1
If nc Mod ns = 1 Then
oculta(s-1) = Int(nc / ns)
nc = nc - (oculta(s-1) + 1)
If s = ns And Not (nc Mod ns) Then
Print ns; " marineros requieren un m¡nimo de"; cocos; " cocos"
For t As Integer = 1 To ns
Print !"\tEl marinero"; t; " se esconde"; oculta(t - 1)
nc = cocos
For s = 1 To marineros + 1
If nc Mod marineros = 1 Then
oculta(s-1) = nc \ marineros
nc -= oculta(s-1) + 1
If (s = marineros) And (nc Mod marineros = 0) Then
Print marineros; " sailors require a minimum of "; cocos; " coconuts"
For t = 1 To marineros
Print !"\tSailor "; t; " hides "; oculta(t - 1)
Next t
Print !"\tEl mono obtiene"; ns
Print !"\tFinalmente, cada marinero se lleva"; Int(nc / ns); !"\n"
Print !"\tThe monkey gets "; marineros
Print !"\tFinally, each sailor takes "; (nc \ marineros) & Chr(10)
Exit Do
End If
Else
Exit For
End If
Next s
cocos += ns
cocos += marineros
Loop
Next ns
Next marineros
Sleep