<?php
foreach(range(0, 1000, 11) as $i) { if (($i - 3) % 13 == 0 and ($i - 5) % 12 == 0 and $i % 11 == 0) {
echo $i, PHP_EOL;
break;
}
}
PD9waHAKCmZvcmVhY2gocmFuZ2UoMCwgMTAwMCwgMTEpIGFzICRpKSB7CiAgICBpZiAoKCRpIC0gMykgJSAxMyA9PSAwIGFuZCAoJGkgLSA1KSAlIDEyID09IDAgYW5kICRpICUgMTEgPT0gMCkgewogICAgICAgIGVjaG8gJGksIFBIUF9FT0w7CiAgICAgICAgYnJlYWs7CiAgICB9Cn0=