首页 > 编程知识 正文

最小的linux开发板(linux开发板设置应用程序开机自启动,ARM-Linux开机自启动设置-ok6410开发板)

时间:2023-05-05 12:56:12 阅读:124259 作者:1179

探测描述

thedigitalrootofapositiveintegerisfoundbysummingthedigitsoftheinteger.iftheresultingvalueisasingledigitthentdigitisthed igisthed uecontainstwoormoredigits,thosedigitsaresummedandtheprocessis

repeated.thisiscontinuedaslongasnecessarytoobtainasingledigit。

For example,considerthepositiveinteger 24.adding the2and the4yieldsavalueof6. since6isasingledigit, 6 isthedigitalrootof 24.nowconsiderthepositiveinteger 39.adding the3and the9 yields 12.since 12 isnotasingledigit,the process

must be repeated.adding the1 and the2yeilds 3,asingledigitandalsothedigitalrootof 39。

the eddy‘seasyproblemisthat : giveyouthen,wantyoutofindthen ^ n‘s数字路由。

输入输出

theinputfilewillcontainalistofpositiveintegersn,oneperline.theendoftheinputwillbeindicatedbyanintegervalueofzero.notice 33

输出

outputn ^ n‘sdigitalrootonaseparatelineoftheoutput。

样本输入

2

4

0

样本输出

4

4

亚瑟

埃迪迪

/* * * * * * * * * * * * * * * *

是看到FFT头晕了,还是不知道? 然后,回头想刷水问题,寻找快感,没想到撞到了一个小炸弹。

使用九多条定理,不知道这个定理确实很难做……

九馀定理简介:一个数n的各位数字之和对9取馀,和这个数对9取馀一样。

有个洞。 请记住。 以后别忘了……

* * * * * * * *包含

#包含

用户命名空间STD;

int main () )

{

int n,I,s;

wile (扫描(' % d ',n ) n ) ) ) ) ) ) ) )。

{

s=1;

for(I=1; i=n; I ) {

s=s*n%9;

}

if(s==0) printf(9(n );

ELSEprintf('%dn ',s );

}

返回0;

}

有个洞……

译文: 3358 blog.csdn.net/u 011308691/article/details/2488559

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。