#R, (削除) 72 67 (削除ここまで) 29 bytes
R, (削除) 72 67 (削除ここまで) 29 bytes
Edit: Thanks to @rturnbull for shaving off two bytes.
n=scan();`if`(n%%9|!n,n%%9,9)
#R, (削除) 72 67 (削除ここまで) 29 bytes
Edit: Thanks to @rturnbull for shaving off two bytes.
n=scan();`if`(n%%9|!n,n%%9,9)
R, (削除) 72 67 (削除ここまで) 29 bytes
Edit: Thanks to @rturnbull for shaving off two bytes.
n=scan();`if`(n%%9|!n,n%%9,9)
#R, (削除) 72 67 (削除ここまで) 3129 bytes
First answer produces erroneous results dueEdit: Thanks to floating point precision issues in R@rturnbull for shaving off two bytes.
n=scan();ifelse;`if`(n%%9|!n,n%%9,9)
#R, (削除) 72 67 (削除ここまで) 31 bytes
First answer produces erroneous results due to floating point precision issues in R.
n=scan();ifelse(n%%9|!n,n%%9,9)
#R, (削除) 72 67 (削除ここまで) 29 bytes
Edit: Thanks to @rturnbull for shaving off two bytes.
n=scan();`if`(n%%9|!n,n%%9,9)
#R, (削除) 72 67 (削除ここまで) 3931 bytes
First answer produces erroneous results due to floating point precision issues in R.
n=scan();if;ifelse(n%%9|!n)ifelse(n%%9,n%%9,9)else 0
#R, (削除) 72 67 (削除ここまで) 39 bytes
First answer produces erroneous results due to floating point precision issues in R.
n=scan();if(n)ifelse(n%%9,n%%9,9)else 0
#R, (削除) 72 67 (削除ここまで) 31 bytes
First answer produces erroneous results due to floating point precision issues in R.
n=scan();ifelse(n%%9|!n,n%%9,9)