Skip to content

Instantly share code, notes, and snippets.

@cg4jins
Created July 23, 2019 04:36
Show Gist options
  • Save cg4jins/ab9c0bf618eb5c342260bef7b4010ece to your computer and use it in GitHub Desktop.
Save cg4jins/ab9c0bf618eb5c342260bef7b4010ece to your computer and use it in GitHub Desktop.
class Solution {
fun solution(s: String): Boolean {
if (s.length != 4 && s.length != 6){
return false
}
for (c in s.toCharArray()){
if (!c.isDigit()){
return false
}
}
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment