📄 problem - 1013.mht
字号:
From: "Saved by Windows Internet Explorer 7"
Subject: Problem - 1013
Date: Sat, 15 Nov 2008 01:05:15 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----=_NextPart_000_0000_01C946BE.383E5730"
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01C946BE.383E5730
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://acm.hdu.edu.cn/showproblem.php?pid=1013
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Problem - 1013</TITLE>
<META content=3D"HDOJ ACM ICPC OJ C C++ Pascal Java" name=3Dkeywords>
<META http-equiv=3DContent-Type =
content=3Dtext/html;charset=3Dgb2312><LINK media=3Dall=20
href=3D"http://acm.hdu.edu.cn/images/global.css" type=3Dtext/css=20
rel=3Dstylesheet><LINK media=3Dall =
href=3D"http://acm.hdu.edu.cn/css/diyinhead.css"=20
type=3Dtext/css rel=3Dstylesheet>
<SCRIPT src=3D"http://acm.hdu.edu.cn/js/global.js" =
type=3Dtext/javascript></SCRIPT>
<META content=3D"MSHTML 6.00.6001.18148" name=3DGENERATOR></HEAD>
<BODY><A name=3Dtop></A>
<TABLE style=3D"WORD-WRAP: break-word" cellSpacing=3D0 cellPadding=3D0 =
width=3D980=20
align=3Dcenter border=3D0>
<TBODY>
<TR>
<TD=20
style=3D"BORDER-RIGHT: #1a5cc8 1px solid; BORDER-TOP: #1a5cc8 1px =
solid; BORDER-LEFT: #1a5cc8 1px solid; BORDER-BOTTOM: #1a5cc8 1px solid" =
align=3Dmiddle width=3D"100%"><A =
href=3D"http://acm.hdu.edu.cn/"><IMG height=3D116=20
src=3D"http://acm.hdu.edu.cn/images/banner.jpg" width=3D"100%"=20
border=3D0></A></TD></TR>
<TR>
<TD=20
style=3D"BORDER-RIGHT: #1a5cc8 1px solid; BORDER-TOP: #1a5cc8 1px =
solid; BORDER-LEFT: #1a5cc8 1px solid; BORDER-BOTTOM: #1a5cc8 1px =
solid">
<TABLE cellSpacing=3D0 cellPadding=3D1 width=3D"100%">
<TBODY>
<TR class=3Dbanner align=3Dmiddle bgColor=3D#1a5cc8 height=3D25>
<TD>Online Judge</TD>
<TD>Problem Set</TD>
<TD>Authors</TD>
<TD>Online Contests</TD>
<TD>Exercise Author</TD></TR>
<TR style=3D"FONT-SIZE: 16px" align=3Dmiddle>
<TD vAlign=3Dtop width=3D"20%"><A =
href=3D"http://acm.hdu.edu.cn/">Home=20
Page</A><BR><A=20
=
href=3D"http://acm.hdu.edu.cn/notification.php">Notification</A><BR><A=20
href=3D"http://acm.hdu.edu.cn/faq.php">F.A.Q</A><BR><A=20
href=3D"http://acm.hdu.edu.cn/forum">Forum</A><BR><A=20
href=3D"http://acm.hdu.edu.cn/admin">Administration</A> =
</TD>
<TD vAlign=3Dtop width=3D"20%">
<FORM action=3D/search.php method=3Dget><A=20
=
href=3D"http://acm.hdu.edu.cn/listproblem.php?vol=3D1">Problem=20
Archive</A><BR><A =
href=3D"http://acm.hdu.edu.cn/submit.php">Submit=20
Solution</A><BR><A =
href=3D"http://acm.hdu.edu.cn/status.php">Realtime=20
Judge Status</A><BR><INPUT type=3Dhidden value=3Dproblem=20
name=3Dfield><INPUT class=3Dtext60 name=3Dkey> <INPUT =
class=3Dbutton40 type=3Dsubmit value=3DSearch>=20
</FORM></TD>
<TD vAlign=3Dtop width=3D"20%">
<FORM action=3D/search.php method=3Dget><A=20
href=3D"http://acm.hdu.edu.cn/register.php">Register New=20
Author</A><BR><A =
href=3D"http://acm.hdu.edu.cn/modifyuser.php">Update=20
Your Information</A><BR><A=20
href=3D"http://acm.hdu.edu.cn/ranklist.php">Authors=20
Ranklist</A><BR><INPUT type=3Dhidden value=3Dauthor =
name=3Dfield><INPUT=20
class=3Dtext60 name=3Dkey> <INPUT class=3Dbutton40 =
type=3Dsubmit value=3DSearch>=20
</FORM></TD>
<TD vAlign=3Dtop width=3D"20%"><A=20
=
href=3D"http://acm.hdu.edu.cn/contests/contest_show.php?cid=3D157"=20
?>Next Contest Time<BR><SPAN=20
style=3D"FONT-SIZE: 14px; COLOR: red">2008-11-22 12:00:00=20
(GMT+8)</SPAN></A><BR><A=20
=
href=3D"http://acm.hdu.edu.cn/contests/contest_list.php?type=3Dscheduled"=
>Scheduled=20
Contests</A><BR><A=20
=
href=3D"http://acm.hdu.edu.cn/contests/contest_list.php?type=3Dpassed">Pa=
ssed=20
Contests</A><BR><A style=3D"COLOR: red"=20
href=3D"http://acm.hdu.edu.cn/diy/contest_list.php">DIY =
Contests !</A>=20
</TD>
<TD width=3D"20%">
<FORM action=3D/userloginex.php?action=3Dlogin =
method=3Dpost>
<TABLE cellSpacing=3D0 width=3D168 align=3Dcenter =
border=3D0>
<TBODY>
<TR>
<TD width=3D68>Author ID </TD>
<TD align=3Dright><INPUT class=3Dtext90 maxLength=3D20=20
name=3Dusername></TD></TR>
<TR>
<TD>Password </TD>
<TD align=3Dright><INPUT class=3Dtext90 type=3Dpassword =
maxLength=3D20=20
name=3Duserpass></TD></TR></TBODY></TABLE><INPUT =
class=3Dbutton40 type=3Dsubmit value=3D"Sign In" name=3Dlogin> <A=20
href=3D"http://acm.hdu.edu.cn/register.php">Register new =
ID</A>=20
</FORM></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD align=3Dmiddle><BR>
<H1 style=3D"COLOR: #1a5cc8">Digital Roots</H1><FONT =
size=3D+0><B><SPAN=20
style=3D"FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: green; =
FONT-FAMILY: Arial">Time=20
Limit: 2000/1000 MS (Java/Others) Memory =
Limit:=20
65536/32768 K (Java/Others)<BR>Total Submission(s):=20
5825 Accepted Submission(s):=20
1634<BR></SPAN></B></FONT><BR><BR>
<DIV class=3Dpanel_title align=3Dleft>Problem Description</DIV>
<DIV class=3Dpanel_content>The digital root of a positive integer =
is found=20
by summing the digits of the integer. If the resulting value is a =
single=20
digit then that digit is the digital root. If the resulting value =
contains=20
two or more digits, those digits are summed and the process is =
repeated.=20
This is continued as long as necessary to obtain a single=20
digit.<BR><BR>For example, consider the positive integer 24. =
Adding the 2=20
and the 4 yields a value of 6. Since 6 is a single digit, 6 is the =
digital=20
root of 24. Now consider the positive integer 39. Adding the 3 and =
the 9=20
yields 12. Since 12 is not a single digit, the process must be =
repeated.=20
Adding the 1 and the 2 yeilds 3, a single digit and also the =
digital root=20
of 39.<BR></DIV>
<DIV class=3Dpanel_bottom> </DIV><BR>
<DIV class=3Dpanel_title align=3Dleft>Input</DIV>
<DIV class=3Dpanel_content>The input file will contain a list of =
positive=20
integers, one per line. The end of the input will be indicated by =
an=20
integer value of zero.<BR></DIV>
<DIV class=3Dpanel_bottom> </DIV><BR>
<DIV class=3Dpanel_title align=3Dleft>Output</DIV>
<DIV class=3Dpanel_content>For each integer in the input, output =
its digital=20
root on a separate line of the output.<BR></DIV>
<DIV class=3Dpanel_bottom> </DIV><BR>
<DIV class=3Dpanel_title align=3Dleft>Sample Input</DIV>
<DIV class=3Dpanel_content><PRE>24
39
0</PRE></DIV>
<DIV class=3Dpanel_bottom> </DIV><BR>
<DIV class=3Dpanel_title align=3Dleft>Sample Output</DIV>
<DIV class=3Dpanel_content><PRE>6
3</PRE></DIV>
<DIV class=3Dpanel_bottom> </DIV><BR>
<DIV class=3Dpanel_title align=3Dleft>Source</DIV>
<DIV class=3Dpanel_content>Greater New York 2000</DIV>
<DIV class=3Dpanel_bottom> </DIV><BR>
<CENTER=20
style=3D"FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: #1a5cc8; =
FONT-FAMILY: Arial"><A=20
=
href=3D"http://acm.hdu.edu.cn/statistic.php?pid=3D1013">Statistic</A>&nbs=
p;| <A=20
=
href=3D"http://acm.hdu.edu.cn/submit.php?pid=3D1013">Submit</A> |&nb=
sp;<A=20
=
href=3D"http://acm.hdu.edu.cn/listproblem.php?vol=3D1">Back</A></CENTER><=
BR></TD></TR>
<TR>
<TD>
<TABLE=20
style=3D"BORDER-RIGHT: #1a5cc8 1px solid; BORDER-TOP: #1a5cc8 1px =
solid; FONT-SIZE: 14px; BORDER-LEFT: #1a5cc8 1px solid; BORDER-BOTTOM: =
#1a5cc8 1px solid"=20
cellSpacing=3D0 cellPadding=3D1 width=3D"100%">
<TBODY>
<TR align=3Dmiddle>
<TD class=3Dfooter_link height=3D45><A=20
href=3D"http://acm.hdu.edu.cn/">Home</A> | <A=20
=
href=3D"http://acm.hdu.edu.cn/showproblem.php?pid=3D1013#top">Top</A></TD=
>
<TD=20
style=3D"PADDING-RIGHT: 6px; PADDING-LEFT: 6px; =
PADDING-BOTTOM: 6px; PADDING-TOP: 6px">Hangzhou=20
Dianzi University Online Judge 2.20<BR>Copyright © =
2005-2008 <A=20
href=3D"mailto:acm@hdu.edu.cn">HDU ACM Team</A>. All Rights=20
Reserved.<BR>Designer & Developer : <A=20
href=3D"mailto:mailwrt@163.com">Wang Rongtao</A><BR><SPAN=20
class=3Dpagerunstatus>Total 0.000890(s) query 1, Server time =
:=20
2008-11-15 01:05:39, Gzip enabled</SPAN> </TD>
<TD class=3Dfooter_link><A =
href=3D"javascript:history.go(-1);">Back</A>=20
| <A=20
=
href=3D"javascript:history.forward();">Forward</A></TD></TR></TBODY></TAB=
LE></TD></TR></TBODY></TABLE></BODY></HTML>
------=_NextPart_000_0000_01C946BE.383E5730
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-Location: http://acm.hdu.edu.cn/images/banner.jpg
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -