1 C
C
Copy
int centuryFromYear(int year) {
return (year+99)/100;
}
2 C++
C++
Copy
int centuryFromYear(int year)
{
return (year+99)/100;
}
3 Go
Go
Copy
package kata
func century(year int) int {
return (year+99)/100;
}
4 Kotlin
Kotlin
Kotlin
5 R
R
Copy
century <- function(year) {
(year+99) %/% 100
}
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.