From c8fe3a75d40ae41056d8422e787be0075dfcde29 Mon Sep 17 00:00:00 2001 From: isaiahliu Date: Thu, 9 Jan 2025 11:51:44 +0800 Subject: [PATCH] 1 --- src/main/kotlin/p32xx/Problem3280.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/kotlin/p32xx/Problem3280.kt diff --git a/src/main/kotlin/p32xx/Problem3280.kt b/src/main/kotlin/p32xx/Problem3280.kt new file mode 100644 index 00000000..67edc5b5 --- /dev/null +++ b/src/main/kotlin/p32xx/Problem3280.kt @@ -0,0 +1,19 @@ +package p32xx + +import util.expect + +fun main() { + class Solution { + fun convertDateToBinary(date: String): String { + return date.split('-').joinToString("-") { + it.toInt().toString(2) + } + } + } + + expect { + Solution().convertDateToBinary( + "" + ) + } +}