Skip to content

Commit

Permalink
Add B2030 (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
xtenzQ authored Oct 22, 2024
1 parent 338c9d6 commit ec2865b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,16 @@ fun a2030() {

println((a.max() - a.min()) * (n - 1))
}
}

fun b2030() {
val t = readln().toInt()
repeat(t) {
val n = readln().toInt()
print(1)
repeat(n - 1) {
print(0)
}
println()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,17 @@ class A2030KtTest {

assert(input, expectedOutput, { a2030() })
}

@Test
fun `B2030 basic test`() {
val input = "3\n" +
"1\n" +
"2\n" +
"3\n"
val expectedOutput = "1\n" +
"10\n" +
"100\n"

assert(input, expectedOutput, { b2030() })
}
}

0 comments on commit ec2865b

Please # to comment.