C # - 170
using System.Linq;class P{static void Main(string[]a){System.Console.Write(string.Join(",",System.IO.File.ReadAllLines(a[0]).Where(w=>"aeiouy".All(c=>w.Contains(c)))));}}
Diformat:
using System.Linq;
class P
{
static void Main(string[] a) {
System.Console.Write(
string.Join(",", System.IO.File.ReadAllLines(a[0])
.Where(w => "aeiouy".All(c => w.Contains(c)))));
}
}
Tidak mood untuk menerapkan penghitungan tetapi harus mudah.
Path ke daftar kata (versi huruf kecil) harus diteruskan ke program sebagai argumen pertama:
program.exe D:\foo\bar\corncob_lowercase.txt
Keluaran:
abstemiously,authoritatively,behaviourally,consequentially,counterrevolutionary,
disadvantageously,educationally,encouragingly,eukaryotic,evolutionarily,evolutio
nary,exclusionary,facetiously,gregariously,heterosexuality,homosexuality,importu
nately,inconsequentially,instantaneously,insurrectionary,intravenously,manoeuvra
bility,neurologically,neurotically,ostentatiously,pertinaciously,precariously,pr
ecautionary,questionably,revolutionary,simultaneously,supersonically,tenaciously
,uncomplimentary,uncontroversially,unconventionally,undemocratically,unemotional
ly,unequivocally,uninformatively,unintentionally,unquestionably,unrecognisably
Saya mengambil kebebasan mengeluarkan dan memisahkan kata-kata; tak satu pun dari yang ditentukan dalam aturan (yang menyatakan "harus menemukan semua kata", bukan bagaimana (dan JIKA) untuk output).
Termasuk hitungan (+ output): 192 - 5 = 187
using System.Linq;class P{static void Main(string[]a){var r=System.IO.File.ReadAllLines(a[0]).Where(w=>"aeiouy".All(c=>w.Contains(c)));System.Console.Write(string.Join(",",r)+" "+r.Count());}}
Keluaran:
abstemiously,authoritatively,behaviourally,consequentially,counterrevolutionary,
disadvantageously,educationally,encouragingly,eukaryotic,evolutionarily,evolutio
nary,exclusionary,facetiously,gregariously,heterosexuality,homosexuality,importu
nately,inconsequentially,instantaneously,insurrectionary,intravenously,manoeuvra
bility,neurologically,neurotically,ostentatiously,pertinaciously,precariously,pr
ecautionary,questionably,revolutionary,simultaneously,supersonically,tenaciously
,uncomplimentary,uncontroversially,unconventionally,undemocratically,unemotional
ly,unequivocally,uninformatively,unintentionally,unquestionably,unrecognisably 4
3
(Catat penghitungan di akhir: 43)
Tidak ada output ("harus menemukan semua kata"): 137 - 5 = 132
using System.Linq;class P{static void Main(string[]a){var r=System.IO.File.ReadAllLines(a[0]).Where(w=>"aeiouy".All(c=>w.Contains(c)));}}
(Membengkokkan aturan sedikit demi sedikit: tidak benar-benar) Ini menemukan semua kata dan penghitungan tersedia dengan mengeksekusi r.Count()
.