hdu1597】的更多相关文章

Problem Description 假设: S1 = 1 S2 = 12 S3 = 123 S4 = 1234 ......... S9 = 123456789 S10 = 1234567891 S11 = 12345678912 ............ S18 = 123456789123456789 .................. 现在我们把所有的串连接起来 S = 1121231234.......123456789123456789112345678912.........…
find the nth digit Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 14416    Accepted Submission(s): 4444 Problem Description 假设: S1 = 1 S2 = 12 S3 = 123 S4 = 1234 ......... S9 = 123456789 S10 =…
find the nth digit Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12883    Accepted Submission(s): 3915 Problem Description 假设:S1 = 1S2 = 12S3 = 123S4 = 1234.........S9 = 123456789S10 = 1234567…
题意: 求第n个数: 思路: 可以看到一种序列: 1 12 123 1234 12345 123456 1234567 12345678 123456789 1234567891 12345678912 123456789123 ... 那么我可以计算前 i 行数的个数(i+1)*i/2; 直接二分到离n最近的那一层,然后n-(i+1)*i/2;%9就是答案,注意还有9,9%9是0: #include <bits/stdc++.h> using namespace std; typedef l…
POJ题目分类 | POJ题目分类 | HDU题目分类 | ZOJ题目分类 | SOJ题目分类 | HOJ题目分类 | FOJ题目分类 | 模拟题: POJ1006 POJ1008 POJ1013 POJ1016 POJ1017 POJ1169 POJ1298 POJ1326 POJ1350 POJ1363 POJ1676 POJ1786 POJ1791 POJ1835 POJ1970 POJ2317 POJ2325 POJ2390 POJ1012 POJ1082 POJ1099 POJ1114…