complete 30917.kt 30924.kt

This commit is contained in:
2025-09-18 11:27:07 +09:00
parent cc53dae710
commit 268e7729ab
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
fun main() = with(System.`in`.bufferedReader()) {
val a: Int = run {
for (i in 1 until 10) {
println("? A $i")
if (this.readLine().toInt() == 1) {
return@run i
}
}
0
}
val b: Int = run {
for (i in 1 until 10) {
println("? B $i")
if (this.readLine().toInt() == 1) {
return@run i
}
}
0
}
println("! ${a + b}")
}