U E D R , A S I H C RSS

Power Of Cryptography/이영호

- . 류를 바로 . "/10" 로 나 .


... 군.


p를 1834567891242341235423542542451234145678551475585744로 가

k = log(n root string:p)
// 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;
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:24:01
Processing time 0.0082 sec