HDU 1163 Eddy's digital Roots
来源:互联网 发布:数据泄露防护系统破解 编辑:程序博客网 时间:2024/05/21 20:23
题目地址:点击打开链接
思路:9余数定理,详解地址:点击打开链接
AC代码:
#include <iostream>using namespace std;int main(){ int n,i; while(cin>>n) { if(n == 0) break; int temp = 1; for(i=0; i<n; i++) { temp = (temp * n) % 9; } if(temp == 0) cout<<9<<endl; else cout<<temp%9<<endl; } return 0;}
0 0
- hdu 1163 Eddy's digital Roots
- hdu 1163 Eddy's digital Roots
- HDU 1163 Eddy's digital Roots
- HDU 1163 Eddy's digital Roots
- HDU 1163 Eddy's digital Roots
- 数论---HDU 1163 Eddy's digital Roots
- HDU 1163 Eddy's digital Roots
- hdu 1163 Eddy's digital Roots
- HDU 1163 Eddy's digital Roots
- hdu(1163)Eddy's digital Roots
- HDU 1163 Eddy's digital Roots(数论)
- hdu 1163 Eddy's digital Roots
- hdu 1163 Eddy's digital Roots (数论)
- hdu-1163-Eddy's digital Roots
- HDU 1163 Eddy's digital Roots
- hdu-oj 1163 Eddy's digital Roots
- hdu 1163 Eddy’s digital Roots
- hdu 1163 Eddy's digital Roots
- 南邮 OJ 2026 Keroro侵略地球
- MongoDB数据库笔记记录
- android小记anr子线程修改主线程中的UI
- github for windows 登录失败 总是提示密码错误
- iNLP源代码之编辑距离算法(Levenshtein distance)
- HDU 1163 Eddy's digital Roots
- JS学习笔记(五):关于$(function(){});里面的函数不执行问题
- LeetCode Longest Substring Without Repeating Characters
- TSE for SketchUp Pro - 建筑行业
- seo 第三版出来了 zac著
- 南邮 OJ 2027 操作序列
- WPF 自定义Metro Style窗体
- Writable接口
- 回调函数的作用