This commit is contained in:
2024-12-15 07:33:07 +01:00
parent 0592f4a862
commit 3ee70151f1
2 changed files with 232 additions and 2 deletions
+2 -2
View File
@@ -51,7 +51,7 @@ p=9,5 v=-3,-3
2) px == w/2, py > w/2 % h
*/
val z = Array(robots.size) { IntArray(4) }
for (t in 1..1000000000L) {
for (t in 1..w * h) {
/*val good = robots.all {
val x = ((it[0] + t * (it[2] + w)) % w).toInt()
val y = ((it[1] + t * (it[3] + h)) % h).toInt()
@@ -68,7 +68,7 @@ p=9,5 v=-3,-3
z.forEach { grid[it[0], it[1]] = '*' }
grid.debug()
println()
break
return t
}
return 0
}