Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private infix fun Boolean.arrow(other: Boolean) = !(this && !other)
- fun main() {
- var cnt = 0
- val letters = listOf('K', 'P', 'O', 'B', 'I')
- letters.forEach { f ->
- val l1 = letters - f
- l1.forEach { s ->
- val l2 = l1 - s
- l2.forEach { t ->
- val l3 = l2 - t
- l3.forEach { fo ->
- val l4 = l3 - fo
- l4.forEach { fi ->
- "$f$s$t$fo$fi"
- .takeIf { it.first() != 'I' && "IO" !in it && "OI" !in it }
- ?.let { cnt++ }
- }
- }
- }
- }
- }
- println(cnt)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement