- . 한 . "/10" .
... 통 학 .
p 1834567891242341235423542542451234145678551475585744
k = log(n root string:p)
// p string
// p string
= 1/n * log(string:p)
// n .= 1/n * ( log( 10 (string:p )) + log((x) = string:p 한 . -> 1.8) )
// ceil, floor 함 효 한.// 하 log10 함 한.
// 하 log10 해 .
= 1/n * ( + log(x) )
= .
// 하 팅한.= .
형 .
형 해 . ( 하)
형 해 . ( 하)
~cpp
// 파 했.
// 학 함 func(). n, p k 환함.
// 6 44 // 6 57 .
#include <stdio.h>
#include <string.h>
#include <math.h>
int func(char *p, int n){
double ret_buf;
int ret;
int t = strlen(p)-1;
double buf;
char p_buf[3];
sscanf(p_buf, "%2c\0", p); // 한.
buf = log10((double)atof(p_buf)/10); // log한.
ret_buf = (buf+t)/n;
if(ret_buf >= (ceil(ret_buf)+floor(ret_buf))/2) // . +/2 클
ret_buf = (int)ret_buf + 1; // .
ret = (int)ret_buf; // .
return ret;
}










