AWK, 80 bytes
{split("I V X L C D M 1 5 10 50 100 500 1000",d);for(;d[++i]!=$1;);print d[i+7]}
Try it online!
A quick map function. 'split' breaks the string into array elements. Find the stri...
AWK, 82 bytes
{split($1,d,"");i=a=d[1];for(x in d){d[x]>a?a=d[x]:0;d[x]<i?i=d[x]:0}print a+i+$1}
Try it online!
Just pass your input, e.g.:
echo "123" | awk '...'
K (oK), 9 bytes
{x#0}'!10
Try it online!
!10 / pass range your arbitrary number
.' / treat those as a list, and evaluate each separately
{ } / main function...