카타 7급 Predict your age!

1 Kotlin[ | ]

Kotlin
Kotlin
Kotlin

2 R[ | ]

R
Copy
predict_age<-function(age1,age2,age3,age4,age5,age6,age7,age8){
  floor(sum(c(age1,age2,age3,age4,age5,age6,age7,age8)**2)**0.5/2)
}
R
Copy
predict_age<-function(...){
  floor(sqrt(sum(c(...)**2))/2)
}
R
Copy
predict_age<-function(...){
  sqrt(sum(c(...)^2)) %/% 2
}