hud 1061Rightmost Digit
来源:互联网 发布:防身折叠式铁扇子淘宝 编辑:程序博客网 时间:2024/06/06 15:39
/........................................................................................................................................\
打表找规律,
m = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 27 28 29 30 31 ...
i = 1 4 7 6 5 6 3 6 9 0 1 6 3 6 5 6 7 4 9 0 1 4 7 6 5 6 3 6 9 0 ...
很明显是以20为周期的函数。
\......................................................................................................................................../
#include<stdio.h>#include <iostream>#include<string.h>#include<stdlib.h>#include<math.h>#include<algorithm>#include<list>#include<vector>#pragma comment(linker,"/STACK:102400000,102400000")using namespace std;int main() { int n,t; int a[24]={0,1,4,7,6,5, 6,3,6,9,0, 1,6,3,6,5, 6,7,4,9,0}; scanf("%d",&t); while(t--) { scanf("%d",&n); int m=n%20; printf("%d\n",a[m]); } return 0; }
- hud 1061Rightmost Digit
- hud 1061 Rightmost Digit
- hud 1061 Rightmost Digit
- 1061 Rightmost Digit
- HDU 1061 Rightmost Digit
- HDOJ 1061: Rightmost Digit
- hdu 1061 Rightmost Digit
- (hdu 1061)Rightmost Digit
- HDU 1061 Rightmost Digit
- hdoj 1061Rightmost Digit
- HDOJ 1061 Rightmost Digit
- 1061 Rightmost Digit
- HDU 1061 Rightmost Digit
- HDOJ 1061 Rightmost Digit
- hdoj 1061 Rightmost Digit
- hdu rightmost digit 1061
- HDU 1061 Rightmost Digit
- HDOJ 1061 - Rightmost Digit
- OJ1003-Hangover
- Oracle PL/SQL
- poj_1923_XYZZY
- 大鱼吃小鱼 tzc
- Xcode 代码格式化/自动排版
- hud 1061Rightmost Digit
- unity3d 参考坐标系
- Oracle 游标
- 处理大并发之一 对异步非阻塞的理解
- Candy 帮助文档
- Android定位功能(一)
- 火星文
- 2013蓝桥杯C语言本科组B
- Oracle 存储过程 函数