hdu 1452 Happy 2004
来源:互联网 发布:sql中文查询设计器 编辑:程序博客网 时间:2024/05/20 09:26
Happy 2004
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 301 Accepted Submission(s): 220
Problem Description
Consider a positive integer X,and let S be the sum of all positive integer divisors of 2004^X. Your job is to determine S modulo 29 (the rest of the division of S by 29).
Take X = 1 for an example. The positive integer divisors of 2004^1 are 1, 2, 3, 4, 6, 12, 167, 334, 501, 668, 1002 and 2004. Therefore S = 4704 and S modulo 29 is equal to 6.
Take X = 1 for an example. The positive integer divisors of 2004^1 are 1, 2, 3, 4, 6, 12, 167, 334, 501, 668, 1002 and 2004. Therefore S = 4704 and S modulo 29 is equal to 6.
Input
The input consists of several test cases. Each test case contains a line with the integer X (1 <= X <= 10000000).
A test case of X = 0 indicates the end of input, and should not be processed.
A test case of X = 0 indicates the end of input, and should not be processed.
Output
For each test case, in a separate line, please output the result of S modulo 29.
Sample Input
1100000
Sample Output
610
- hdu 1452 Happy 2004
- HDU 1452 Happy 2004
- hdu 1452 Happy 2004
- hdu 1452 Happy 2004
- HDU 1452 Happy 2004
- hdu 1452 happy 2004
- HDU 1452 Happy 2004
- 【HDU】 1452 Happy 2004
- HDU 1452 Happy 2004
- HDU 1452 Happy 2004
- G - Happy 2004------(HDU 1452)
- HDU 1452 Happy 2004 快乐2004
- HDU 1452——Happy 2004
- HDU 1452 Happy 2004(因子和)
- hdu 1452 Happy 2004 因子和
- hdu 1452 Happy 2004(快速幂取模)
- hdu 1452 Happy 2004(积性函数)
- HDU 1452 Happy 2004 (因子和)
- javascript中的cookie使用(javascript权威指南)
- 中国经济的真相(转)
- 采用WAVECOM模块组装-串口的终端GSM MODEM,性能稳定.短信发送量最快可达600条/小时,比用手机发送短信更稳定、快捷。该设备广泛应用于企业短信广告、短信通知、短信查询、短信监控等领域。
- GCC-3.4.6源代码学习笔记(126)
- ADO.NET学习摘记5
- hdu 1452 Happy 2004
- GetProcAddress函数
- 中国互联网“第一次世界大战”
- Studying note of GCC-3.4.6 source (126)
- POJ 1006 Biorhthms
- Shell实现Unix进程间信息交换的几种方法(转)
- 在MDK平台下调试mini2440
- GPRS MODEM池,是一款集成4-8口的彩信收发设备,主要针对高端及彩信需求量大的客户,插入移动运营商的4-8张手机SIM卡后,对外可以与移动运营商的短信中心建立无线连接,对内通过与PC的连接可以让计算机应用系统实现自由的彩信/短信收发。
- FirefoxProtable 非常好用的便携的。