12 lines
239 B
PHP
12 lines
239 B
PHP
<?php
|
|
|
|
$groups = explode("\n\n", file_get_contents('input.txt'));
|
|
|
|
$yesses = 0;
|
|
|
|
foreach ($groups as $group) {
|
|
$group_yes = implode('', explode("\n", $group));
|
|
$yesses += count(array_unique(str_split($group_yes)));
|
|
}
|
|
|
|
echo $yesses; |