[Hacker Rank] Cats and a Mouse (Kotlin)
λ¬Έμ νμ 1κ°μ μ§μ μ’ν μμ κ³ μμ΄ 2λ§λ¦¬, μ₯ 1λ§λ¦¬κ° μμΉ Cat A, Cat B μ€ Mouseμ λ κ°κΉμ΄ μμΉμ μλ κ³ μμ΄λ₯Ό Print νμ κΈ°ν 쑰건 Cat A, Cat B μ Mouseμ κ±°λ¦¬κ° λͺ¨λ λμΌν κ²½μ° Mouseλ₯Ό Print νμ νμ΄- Kotlin fun catAndMouse(x: Int, y: Int, z: Int): String { val a = Math.abs(x - z) val b = Math.abs(y - z) return if (a b) { "Cat B" } else { "Mouse" } } λμ³€λ λΆλΆ μ²μμ κΈνκ² λ Όλ¦¬λ§ μΈμλ μ±λ‘ μ§ννμ λ Failμ΄ λμ μ€λ§νλ€. λ€μ μ°¬μ°¬νκ² μ΄ν΄λ³΄λ κ° κ³ μμ΄λ€..
ππππππ/Algorithm
2022. 8. 1. 20:40
곡μ§μ¬ν
μ΅κ·Όμ μ¬λΌμ¨ κΈ
μ΅κ·Όμ λ¬λ¦° λκΈ
- Total
- Today
- Yesterday
λ§ν¬
TAG
- Hilt
- Cannot create an instance
- android
- android aar library
- Kotlin
- GitHub
- module-info is missing a super type
- decomplie
- The requested URL returned error
- AndroidManifest
- launchemode
- custom getter
- annotaion
- android aar
- android databinding
- import aar
- android launch mode in manifest
- custom setter
- Support for password authentication was removed on August 13
- aar import
- viewmodel
- AAR
- How to import android AAR file
- databinding onclick not working
- DexArchiveBuilderException
- Make onClick event in Android databinding
- databinding onClick
- Effective Kotlin
- com.android.build.api.transform.TransformException
- Please use a personal access token instead
μΌ | μ | ν | μ | λͺ© | κΈ | ν |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
κΈ λ³΄κ΄ν¨