- . . "/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;
}










