-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Week4 #11
base: main
Are you sure you want to change the base?
Conversation
arinming
commented
Sep 28, 2024
•
edited
Loading
edited
for (i in 1..number) { | ||
var divisorCount = 0 | ||
|
||
for (j in 1..Math.sqrt(i.toDouble()).toInt()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 Math 사용하셨군요👍👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
뭔가 불편한 코드,.,...
for (command in commands) { | ||
when (command) { | ||
"prev" -> { | ||
currentPosition = (currentPosition - 10).coerceAtLeast(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코틀린에는 coerceAt
이라는 함수가 제공되네요 신기합니다 ㅋㅎㅋㅎ