| Bytes | Lang | Time | Link |
|---|---|---|---|
| 300 | C++ | 250611T125854Z | Toby Spe |
| 246 | Ruby nl | 250611T055302Z | Value In |
| 220 | JavaScript Node.js | 250611T014627Z | l4m2 |
| 130 | Charcoal | 201120T110834Z | Neil |
| 214 | Julia 1.0 | 201120T145314Z | MarcMush |
| 392 | Java OpenJDK 8 | 201127T182820Z | branboye |
| 231 | SageMath | 201120T185502Z | Robin Ho |
| 086 | 05AB1E | 201120T122624Z | ovs |
| 452 | C gcc lgmp | 201122T053832Z | ErikF |
| 244 | JavaScript Node.js | 201120T122306Z | Arnauld |
| 351 | Icon | 201120T124834Z | Galen Iv |
| 222 | Perl 5 | 201120T143108Z | Kjetil S |
| 214 | Python 3 | 201120T121950Z | Noodle9 |
| 085 | Jelly | 201120T165340Z | Unrelate |
| 077 | Jelly | 201120T122047Z | caird co |
| 232 | R | 201120T130249Z | Dominic |
| 276 | Python 2 | 201120T141516Z | ovs |
| 094 | Husk | 201120T115319Z | Dominic |
C++, 435 320 319 318 300 bytes
This requires letters to have ASCII-compatible encoding. It can't be adapted to EBCDIC or the like because it assumes A...Z are consecutive.
#include<gmpxx.h>
#include<map>
auto f(auto s){std::map<int,mpz_class>a,b;for(int
i=-1,C;C=64,i++<=99;b=a)for(int
c:"LfaRavoHarlieEltaChoOxtrotOlfOtelNdiaUliettIloImaIkeOvemberScarApaUebecOmeoIerraAngoNiformIctorHiskeyRayAnkeeUlu")c<95?a[++C]+=!i:c-=32,a[C]+=b[c];for(int
c:s)a[1]+=a[c];return a[1];}
How it works
Most of the function is concerned with building a mapping from letters to their score in the 100th iteration. Once we have that, we just add up the entries that correspond to the input string.
#include<gmpxx.h>
#include<cctype>
#include<map>
auto f(auto s)
{
std::map<char,mpz_class> a; // A → n(A)ᵢ
std::map<char,mpz_class> b; // A → n(A)ᵢ₋₁
for (int i = 0; i <= 100; ++i) {
char initial = 'A' - 1; // called C when golfed
for (char c:
"Lfa" "Ravo" "Harlie" "Elta" "Cho" "Oxtrot"
"Olf" "Otel" "Ndia" "Uliett" "Ilo" "Ima" "Ike"
"Ovember" "Scar" "Apa" "Uebec" "Omeo" "Ierra" "Ango"
"Niform" "Ictor" "Hiskey" "Ray" "Ankee" "Ulu")
{
if (std::isupper(c)) {
++initial;
a[initial] += !i; // first iteration - count initial letters
} else {
c = std::toupper(c);
}
a[initial] += b[c];
}
b = a; // store this iteration
}
// Now, just sum the count of each input letter.
mpz_class total; // Previously untouched a[1] is accumulator when golfed.
for (auto c: s) {
total += a[c];
}
return total;
}
Demo
#include <iostream>
#include <ranges>
#include <string>
int main()
{
for (char c: std::views::iota('A', 'Z'+1)) {
std::string s(1, c);
std::cout << s << " → " << f(s) << '\n';
}
for (std::string s: {"MOUSE", "CAT", "DOG"}) {
std::cout << s << " → " << f(s) << '\n';
}
}
Ruby -nl, 246 bytes
Technically only -n is required here to take an input; -l flag is for convenience to make it so if you test with multiple inputs or enter an input directly from keyboard instead of piping in, the newline character doesn't muck up the sum function (a["\n"] will evaluate to nil which is incompatible with addition).
a=Hash.new 1
100.times{a=(?A..?Z).map{|s|[s,a[s]+%w[LFA RAVO HARLIE ELTA CHO OXTROT OLF OTEL NDIA ULIETT ILO IMA IKE OVEMBER SCAR APA UEBEC OMEO IERRA ANGO NIFORM ICTOR HISKEY RAY ANKEE ULU][s.ord-65].chars.sum{a[_1]}]}.to_h}
p$_.chars.sum{a[_1]}
JavaScript (Node.js), 220 bytes
f=(s,n=101)=>n--?[...s].reduce((r,c)=>r+=f[n+c]=f[n+c]||f(c+"XLfaRavoHarlieEltaChoOxtrotOlfOtelNdiaUliettIloImaIkeOvemberScarApaUebecOmeoIerraAngoNiformIctorHiskeyRayAnkeeUlu".match(/.[a-z]*/g)[Buffer(c)[0]&31],n),0n):1n
Buffer f(<char>,<int>) in f for speed in code
Charcoal, 133 130 bytes
F¹⁰⁰≔E⪪”$±DuaB``IY″²÷⸿↓⪪∧⮌9Pπx¦⸿S1lJ|#←¹Fι´³As¦L₂≕⬤m⍘M▶⭆dω{ⅈ⊟C0cO\⟦;⊟⁼`→<¬UPνρL⊖¦N↷jOh⧴0r↨J9α➙n\²`⟧JξUL≕φ5u”¶ΣEκ∨¬ι§θ⌕αμθIΣES§θ⌕αι
Try it online! Link is to verbose version of code. Explanation:
F¹⁰⁰
Loop 100 times.
≔E⪪”...”¶ΣEκ∨¬ι§θ⌕αμθ
Calculate the cost of each letter in each word of the NATO phonetic alphabet using 1 on the first pass and the previous cost for that letter on subsequent passes.
IΣES§θ⌕αι
Print the total cost of all the letters in the input word.
Julia 1.0, 223 218 214 bytes
actually finishes by storing already computed values in a dictionnary
function name is >, for example >("MOUSE")
t=Dict()
>(s,n=99)=sum(x->big(get!(()->n<0||split("LFA RAVO HARLIE ELTA CHO OXTROT OLF OTEL NDIA ULIETT ILO IMA IKE OVEMBER SCAR APA UEBEC OMEO IERRA ANGO NIFORM ICTOR HISKEY RAY ANKEE ULU")[x-'@']x>n-1,t,x=>n)),s)
Ungolfed version:
dict = Dict()
function f(str, n=100)
c = big(0)
for x in str
# if (x,n) is not in dict, execute the function below (in do...end) and store the result in dict
c += get!(dict, (x,n)) do
if n < 1
true
else
words = split("LFA RAVO HARLIE ELTA CHO OXTROT OLF OTEL
NDIA ULIETT ILO IMA IKE OVEMBER SCAR APA UEBEC OMEO IERRA ANGO NIFORM
ICTOR HISKEY RAY ANKEE ULU")
word = x * words[x - ('A'-1)]
f(word, n-1)
end
end
end
return c
end
Shorter but non-finishing version:
Julia 1.0, 188 bytes
same approach but no storing of already computed results
>(s,n=99)=sum(x->big(n<0||split("LFA RAVO HARLIE ELTA CHO OXTROT OLF OTEL NDIA ULIETT ILO IMA IKE OVEMBER SCAR APA UEBEC OMEO IERRA ANGO NIFORM ICTOR HISKEY RAY ANKEE ULU")[x-'@']x>n-1),s)
Try it online! (depth 8 so that it can finish)
Java (OpenJDK 8), 397 392 bytes
String[]A=new String[26];char i=123,k;int S(String X){for(;--i>96;)A[i-97]=i+"lfa ravo harlie elta cho oxtrot olf otel ndia uliett ilo ima ike ovember scar apa uebec omeo ierra ango niform ictor hiskey ray ankee ulu".split(" ")[i-97];for(char d:X.toCharArray())i+=U(d<96?d+32:d,100);return i-96;}int U(int c,int i){if(i==-1)return 1;k=0;for(char d:A[c-97].toCharArray())k+=U(d,i-1);return k;}
Input is a String. Outputs in 32 bit cap (rules weren't entirely clear on if it's required, as BigInteger does exist in Java). It takes in unimaginable time to complete, but here's a faster solution that loads comparably instant:
Java (OpenJDK 8), 511 506 bytes
String[]A=new String[26];Integer[][]B=new Integer[26][];int i=-1,j;int S(String X){for(;i++<25;)A[i]=(char)(i+97)+"lfa ravo harlie elta cho oxtrot olf otel ndia uliett ilo ima ike ovember scar apa uebec omeo ierra ango niform ictor hiskey ray ankee ulu".split(" ")[i];for(;i-->0;)B[i]=new Integer[101];for(char d:X.toCharArray())i+=U(d<96?d+32:d,100);return i;}int U(int c,int i){if(i==-1)return 1;j=97;if(B[c-j][i]==null){B[c-j][i]=0;for(char d:A[c-j].toCharArray())B[c-j][i]+=U(d,i-1);}return B[c-j][i];}
edit: Found a shortcut for .toLowerCase() for both
SageMath, 260 255 253 247 246 241 236 234 233 231 bytes
m=map
f=lambda w:sum(vector(m(w.count,m(chr,(65..90))))*(matrix(26,m([sum(ZZ([*m(ord,'v8^x$ 2??&:#Jd;2Nv&=4-wB/yY$4I"o^_bufTTZ fn"U(J1W:ZRYG=/p,ZTRn[RHJA$jbGn-ul2zeVJ')],92).digits(27)[:i])for i in(0..111)].count,(0..675)))+1)^100)
This constructs the transition matrix
[2 1 1 1 0 0 0 0 1 0 0 1 0 0 1 2 0 0 1 1 0 0 0 1 1 0]
[0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0]
[0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0]
[0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 1 1 1 0 0 1 0 1 0 0 1 2 0 0 2 1 1 0 0 0 1 0 2 0]
[1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0]
[0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0]
[0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0]
[0 0 1 0 0 0 0 0 2 1 1 1 1 0 0 0 0 0 1 0 1 1 1 0 0 0]
[0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0]
[1 0 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1]
[0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 1 0 0 0 0 0]
[0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0]
[0 1 0 0 1 2 1 1 0 0 1 0 0 1 1 0 0 2 0 1 1 1 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0]
[0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 2 0 1 1 0 1 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0]
[0 0 0 1 0 2 0 1 0 2 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0]
[0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 2]
[0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]
and raises it to the 100th power, then multiplies the matrix by the column vector representing the letter-frequencies of the input word, and finally computes the 1-norm.
It’s not the shortest entry, but it is fairly efficient: it takes about 4 ms to compute f("MOUSE") on my computer:
sage: %time f("MOUSE")
CPU times: user 4.11 ms, sys: 25 µs, total: 4.13 ms
Wall time: 4.14 ms
11668858751132191916987463577721689732389027026909488644164954259977441
This can almost certainly be shortened further. I bet there’s a more concise way to represent the matrix. (See the third and fifth edits below…)
edit (255): It’s shorter to use sum(v) than v.norm(1) to compute the 1-norm of a vector.
edit (253): We can pass a generator object to the vector() constructor, rather than a list, saving a [] pair.
edit (247): Use a more efficient string representation of the data, grouping the codewords into threes and representing each of the three with a different section of the ascii range: so the three words in a group are represented by characters from the ranges 33–58, 59–84, and 85–110 respectively.
edit (246): Changing the start of the ascii range we’re using from 33 to 39 means that none of the characters in the string need to be escaped, which saves one character since previously there was an escaped backslash \\. This has the pleasing side-effect that one codeword in three is now in plain text.
edit (241): Represent the matrix with a string in a completely different way: using a base-95 encoding of the lengths of the gaps between consecutive 1's, when the matrix is read by columns. In order to make the column-first order work without extra code, I’ve transposed everything, so now it’s multiplying a row vector by the 100th power of the transposed transition matrix.
The encoded list of numbers is:
[5, 6, 15, 14, 3, 4, 5, 4, 3, 1, 3, 6, 9, 4, 7, 8, 9, 5, 7, 26, 0, 3, 2, 0, 4, 8, 6, 3, 16, 7, 3, 5, 7, 3, 5, 5, 17, 4, 3, 8, 0, 1, 14, 3, 3, 12, 8, 4, 18, 4, 2, 17, 3, 0, 8, 2, 3, 4, 5, 2, 15, 1, 8, 0, 15, 12, 1, 2, 0, 16, 10, 8, 2, 0, 12, 4, 4, 9, 0, 9, 6, 7, 1, 17, 3, 4, 1, 1, 3, 11, 6, 6, 3, 2, 11, 3, 1, 2, 8, 6, 2, 17, 7, 2, 4, 0, 6, 3, 24, 9, 0]
This list is treated as a sequence of digits in base 27, for encoding purposes.
Where there is a 2 in the (transition matrix minus the identity), we represent that by a 0 in this list. After all, what is a two but a pair of ones at zero distance from each other?
Sadly this version is a few milliseconds slower – but we are playing golf, after all, not racing.
edit (236): Use a slightly different base-95 encoding that allows for a terser decoder, taking advantage of the fact that the integer constructor ZZ(digits, base) doesn’t mind if some of the digits are ≥ base. So we use digits in the printable range (32–126), even though the base is 95. The final (most significant) digit is 5, which therefore cannot be subject to this treatment, so we add it separately.
One could save an additional character by inserting a literal ^E character at the end of the string and removing the ,5 following it, but surely one must maintain some decorum.
edit (234): It turns out that using base 92, rather than 95, means the encoded string consists entirely of printable ascii characters that do not need to be escaped.
edit (233): map(w.count,map(chr,(65..90))) is one character shorter than w.count(chr(c))for c in(65..90).
edit (231): Now we’re using the map function four times, it’s worth abbreviating.
05AB1E, 93 86 bytes
Takes input in lowercase.
-7 bytes thanks to Kevin Cruijssen!!
тFA.•_7R₆"9~úCĆ~'ÍΩ₃M¿jŽ×Øûå…{×}ζ¥ny†–År{è˜dÉ4sK%<0•“ÿ¼¯¤œ®ÈŠˆƒ‹Š™—……ÍЗ¼°µ†¸šÉµ“#{‡]g
Try it online! with 7 iterations.
Commented:
# implicit input: the starting word
т # push 100
F ] # loop that many times:
A # push the alphabet "abc ... xyz"
.•8Á ... Ôò• # push compressed alphabet string "alfa bravo foxtrot juliett kilo lima papa romeo tango whiskey xray yankee zulu"
“ ¼¯ .. ɵ“ # push compressed dictionary string "charlie delta echo golf hotel india mike november oscar quebec sierra uniform victor"
ÿ # with the other string concatenated to the front
# # split on spaces
{ # sort the words
‡ # transliterate: replace each character of the alphabet with the word at same index in the current string
# a->alfa, b->bravo, ..., z->zulu
g # after the loop: take the length
C (gcc) (-lgmp), 464 456 452 bytes
- -8 by using
mpz_array_init() - -4 by @ceilingcat
As C doesn't have a native bignum library, I'm using GMP. To speed up the calculations, I memoize each stage of the computation.
#import<gmp.h>
*l[]={"ALFA","BRAVO","CHARLIE","DELTA","ECHO","FOXTROT","GOLF","HOTEL","INDIA","JULIETT","KILO","LIMA","MIKE","NOVEMBER","OSCAR","PAPA","QUEBEC","ROMEO","SIERRA","TANGO","UNIFORM","VICTOR","WHISKEY","XRAY","YANKEE","ZULU"};mpz_t t[2600];g(i,s,o,v,j)char*s;mpz_t*v,o;{for(;*s;mpz_add(o,o,*v))v=t+i*26+(j=*s++-65),mpz_sgn(*v)?:i?g(i-1,l[j],*v):mpz_set_ui(*v,strlen(l[j]));}f(s,o)mpz_t o;{mpz_init(o);mpz_array_init(*t,2600,512);g(99,s,o);}
JavaScript (Node.js), 257 248 244 bytes
The case of the input string doesn't matter. Returns a BigInt.
f=(s,C=(n=100,A="XLfaRavoHarlieEltaChoOxtrotOlfOtelNdiaUliettIloImaIkeOvemberScarApaUebecOmeoIerraAngoNiformIctorHiskeyRayAnkeeUlu".match(/.[a-z]*/g)).map(_=>1n),g=s=>Buffer(s).reduce((t,c)=>t+C[c&31],0n))=>n--?f(s,A.map((w,i)=>C[i]+g(w))):g(s)
Commented
The array A[] consists of all NATO words without the leading letter and with an extra dummy entry at index 0:
A = "XLfaRavoHarlieEltaCho...AnkeeUlu".match(/.[a-z]*/g)
// -> [ "X", "Lfa", "Ravo", "Harlie", "Elta", "Cho", ..., "Ankee", "Ulu" ]
Main function:
f = ( // f is a recursive function taking:
s, // s = input string
C = ( // C[] = array of letter costs, initially
// filled with 1n (BigInt literal)
n = 100, // n = number of iterations
A = ... // A[] = NATO dictionary (as defined above)
).map(_ => 1n), //
g = s => // g = helper function taking a string s
Buffer(s) //
.reduce((t, c) => // for each character c in s:
t + C[c & 31], // add the cost of this character to t
0n // starting with t = 0
) // end of reduce()
) => //
n-- ? // decrement n; if it was not equal to 0:
f( // do a recursive call:
s, // pass s unchanged
A.map((w, i) => // for each entry w at position i in A[]:
C[i] + // get the cost of the leading letter
g(w) // add the cost of the other letters
) // end of map()
) // end of recursive call
: // else:
g(s) // stop the recursion and return g(s)
Icon, 379 354 351 bytes
procedure f(s)
v:=list(26,0)
b:=[]
"ALFA BRAVO CHARLIE DELTA ECHO FOXTROT GOLF HOTEL INDIA JULIETT KILO LIMA MIKE NOVEMBER OSCAR PAPA QUEBEC ROMEO SIERRA TANGO UNIFORM VICTOR WHISKEY XRAY YANKEE ZULU "?while put(b,tab(upto(" ")))&move(1)
v[ord(!s)-64]+:=1&\z;|1\100&{t:=list(26,0)
t[ord(!b[i:=1to*v])-64]+:=v[i]&\z
v:=t}&\z;(s:=0)+:=!v&\z
return s
end
Perl 5, 279 222 bytes
sub f{my($c,$_,$n)=(0,@_,100);$c+=$d{$_,$n}//=$n<1||f($_.(LFA,RAVO,HARLIE,ELTA,CHO,OXTROT,OLF,OTEL,NDIA,ULIETT,ILO,IMA,IKE,OVEMBER,SCAR,APA,UEBEC,OMEO,IERRA,ANGO,NIFORM,ICTOR,HISKEY,RAY,ANKEE,ULU)[-65+ord],$n-1)for/./g;$c}
...which is a translation of the Julia answer from @MarcMush
My own approach was 279 bytes: Try it online!
Python 3, 286 \$\cdots\$ 238 214 bytes
Saved a whopping 44 48 72! bytes thanks to Jitse!!!
f=lambda s,n=100:n and sum(f(c+"LFA RAVO HARLIE ELTA CHO OXTROT OLF OTEL NDIA ULIETT ILO IMA IKE OVEMBER SCAR APA UEBEC OMEO IERRA ANGO NIFORM ICTOR HISKEY RAY ANKEE ULU".split()[ord(c)-65],n-1)for c in s)or len(s)
Times out on TIO and is still running on my laptop. Will post my running time when it finishes. As Arnauld correctly predicted, it tried to melt my computer into a wormhole but it valiantly defended itself with a MemoryError! :))) Have added smaller (\$1\$ iteration and \$10\$ iterations) testcases to check that it does indeed work in theory.
Jelly, 85 bytes
ċⱮØA
Çæ×“¢ị⁼Ɱ4ɦȷ3æ⁷ŀṣ⁶LṬⱮGṾxƬḟṬƊÆUFṡẉ⁴lṂṃȷỵḥṘ¤ʠḟẠṅṫSæßṠdċṣçẓẊẆPḲDṂƑĠṆṾ⁼Ɓ»ŒuḲÇ€æ*ȷ2¤FS
I couldn't figure out how to compress the matrix itself better than the dictionary could, so this probably can't get shorter than caird's solution, but I figured it's worth posting anyways since it's considerably faster. There might still be a bit of room to golf, though, since I was already able to knock a byte off by manually fiddling with the uncompressed string.
ċⱮØA Monadic helper link, convert string to letter frequencies:
Ɱ for each element of
ØA "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
ċ count how many times it occurs in the argument.
Çæ×“...»ŒuḲÇ€æ*ȷ2¤FS Main link:
æ× matrix multiply
Ç the input's letter frequencies
¤ by:
“...» "alfa bravo Charlie delta echo foxtrot golf hotel India Juliett kilo mail Mike November Oscar papa Quebec Romeo sierra tango uniform Victor whiskey rayx Yankee Zulu"
Œu uppercased
Ḳ and split on spaces,
Ç€ with each word converted to letter frequencies
æ*ȷ2 and the resulting matrix multiplied by itself 100 times.
F Flatten the resulting vector
S and return its sum.
Jelly, 79 77 bytes
“¡þƓẠı$1ƇẆÇ£ėƬỵ⁸ŀƘṣHỌŻ×²ıÞṆ]q1@ƒḳ0JñỴngṙƑ§ƥỵ⁼@¬TQñɱ⁼=Œ¬⁴RȦȧ¡⁸ƒƈẈ»ŒlḲị@OFµȷ2¡L
This times out on TIO, but Try it online! with only 9 iterations
Takes input in lowercase
-2 bytes thanks to Unrelated String
How it works
“¡þƓ...ƒƈẈ»ŒlḲị@OFµȷ2¡L - Main link. Takes a string S on the left
µȷ2¡ - Do 100 times, updating the left argument each time, starting with S:
“¡þƓ...ƒƈẈ» - The compressed string "India Juliett kilo mail Mike November Oscar papa Quebec Romeo sierra tango uniform Victor whiskey rayx Yankee Zulu alfa bravo Charlie delta echo foxtrot golf hotel"
Œl - Lowercase
Ḳ - Split on spaces
O - Get the char code of each character in the left argument
ị@ - 1-based, modular index into the list of phonetic spellings
F - Flatten
L - Length
R, 260 259 236 235 232 bytes
Edit: -3 bytes thanks to Robin Ryder, and -23 bytes using a version of Arnauld's trick of dropping the first letter of each word
a=scan(,'')
lfa ravo harlie elta cho oxtrot olf otel ndia uliett ilo ima ike ovember scar apa uebec omeo ierra ango niform ictor hiskey ray ankee ulu
v=!!1:26
f=function(w)sum(v[utf8ToInt(w)-96])%%2^32
for(i in 0:99)v=v+sapply(a,f)
Function f that returns output modulo 2^32 (as allowed by rules) to stay within range of integer accuracy in R.
a=scan(,'') # fill vector a with
alfa bravo charlie... # NATO phonetic alphabet
# (need a newline to stop filling vector)
v=rep(1,26) # initialize vector v of values with 1s
f=function(w) # f = function to calculate value of a word
sum(v[ # sum of elements of v at indices given by
utf8ToInt(w)-96]) # utf8 values of letters, minus 96,
%%2^32 # modulo 2^32
for(i in 1:100) # now perform 100 iterations of
v= # updating v with
sapply(a,f) # the value of each word in a,
# calculated with the current v
Python 2, 292 276 bytes
This is a little longer than the other Python answer, but finishes instantly.
w=[input()]+'LFA RAVO HARLIE ELTA CHO OXTROT OLF OTEL NDIA ULIETT ILO IMA IKE OVEMBER SCAR APA UEBEC OMEO IERRA ANGO NIFORM ICTOR HISKEY RAY ANKEE ULU'.split()
s=[1]+[0]*26
exec"s=[i and v+sum(j*c.count(chr(i+64))for j,c in zip(s,w))for i,v in enumerate(s)];"*101
print sum(s)
Husk, 98 95 94 bytes
Edit: -3 bytes thanks to caird coinheringaahing
L!100¡ṁS:o!₁c
w¨nḋ?ẏ_₇↑₇عṀ≥ÏΣ⁶Ḃ€żẎ,Ä₄ βże⁶ŻθŻ₂»Żβ∞Ξ⌈¬¹¢»ÿ¿k»aΨ₈2≡≥⁷_⁷‡@ƒΨ▼«± ¦τaċ‼₀xt►Φ₀lf₀£t
Try it online! (but with only 9 iterations)
Unfortunately TIO errors with a 'stack overflow' at the 10th iteration, but the program/algorithm should run if provided with a (substantially) larger stack. Remove the initial L to check the actual string at each iteration like this.
L # get the length of
!100 # the 100th element of
¡ # repeatedly applying this function:
ṁȯ # map & concatenate
!₁ # each element of ₁ (see below) at index of
c # codepoint of each character of input
# function ₁:
w # split on whitespace
¨ḋα⌋...«ḣĖ # compressed string:
# "india juliett kilo ... foxtrot golf hotel"