[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
- android aar
- Please use a personal access token instead
- databinding onClick
- annotaion
- viewmodel
- custom getter
- AndroidManifest
- custom setter
- module-info is missing a super type
- DexArchiveBuilderException
- Hilt
- The requested URL returned error
- android
- Support for password authentication was removed on August 13
- launchemode
- GitHub
- Make onClick event in Android databinding
- Effective Kotlin
- decomplie
- android databinding
- import aar
- Kotlin
- How to import android AAR file
- databinding onclick not working
- AAR
- Cannot create an instance
- android launch mode in manifest
- com.android.build.api.transform.TransformException
- aar import
- android aar library
μΌ | μ | ν | μ | λͺ© | κΈ | ν |
---|---|---|---|---|---|---|
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 |
κΈ λ³΄κ΄ν¨