杭電acm1597 find the nth digit
S1 = 1
S2 = 12
S3 = 123
S4 = 1234
.........
S9 = 123456789
S10 = 1234567891
S11 = 12345678912
............
S18 = 123456789123456789
..................
現在我們把所有的串連線起來
S = 1121231234.......123456789123456789112345678912.........
那麼你能告訴我在S串中的第N個數字是多少嗎?
相關推薦
杭電acm1597 find the nth digit
假設: S1 = 1 S2 = 12 S3 = 123 S4 = 1234 ......... S9 = 123456789 S10 = 1234567891 S11 = 12345678912 ............ S18 = 123456789123456789 ..................
hdu 1957 find the nth digit
假設: S1 = 1 S2 = 12 S3 = 123 S4 = 1234 ......... S9 = 123456789 S10 = 1234567891 S11 = 12345678912 ............ S18 = 123456789123456789 ..............
HDU1597 find the nth digit【模擬】
find the nth digit Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1597
find the nth digit HDU - 1597 二分 思維
題解 打表計算1+2+3+…+N的所有和 二分查詢到第一個小於N的那個和 N減去他 接下來就是9個一迴圈 N = (N - 1) % 9 + 1得到是哪個數字 AC程式碼 #include <stdio.h> #include <bits/stdc++.h>
(hdu step 4.1.5)find the nth digit(求S串中的第n個位置上是什麼數字)
假設:S1 = 1S2 = 12S3 = 123S4 = 1234.........S9 = 123456789S10 = 1234567891S11 = 12345678912............S18 = 123456789123456789..................現在我們把所有的串連線起
find the nth digit HDU
假設: S1 = 1 S2 = 12 S3 = 123 S4 = 1234 ......... S9 = 123456789 S10 = 1234567891 S11 = 12345678912 ............ S18 = 123456789123456789 ........
find the nth digit
假設: S1 = 1 S2 = 12 S3 = 123 S4 = 1234 ......... S9 = 123456789 S10 = 1234567891 S11 = 12345678912 ............ S18 = 123456789123456789 ..................
find the nth digit(數論)
假設: S1 = 1 S2 = 12 S3 = 123 S4 = 1234 ......... S9 = 123456789 S10 = 1234567891 S11 = 12345678912
hd 1597 find the nth digit(解決超時的牛氣哄哄的新辦法)
<h1 style="COLOR: #1a5cc8"><div class="panel_title" align="left"><h1 style="COLOR: #1a5cc8">find the nth digit</h1&g
Step5. 專題 1.ACM模擬 HDU1597 find the nth digit【模擬】
先查詢是第幾行,然後對9取餘即可。 注意,i從1開始尋找時,程式碼雖然簡介,但是不好,有風險。查詢的過程耗時太大。 程式碼1(模擬的方式,不推薦) 這兩次提交的是程式碼1,第二次提交還加了cin 優化,結果時間卻更長了。 #include<iostrea
杭電-1599 find the mincost route(最小環有向圖)
find the mincost route Time Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4164
hdu 1597 find the nth digit
Problem Description 假設: S1 = 1 S2 = 12 S3 = 123 S4 = 1234 ......... S9 = 123456789 S10 = 1234567891
HDU 1597 find the nth digit
題目: Description 假設: S1 = 1 S2 = 12 S3 = 123 S4 = 1234 ......... S9 = 123456789 S10 = 1234
find the nth digit(數論)
假設: S1 = 1 S2 = 12 S3 = 123 S4 = 1234 ......... S9 = 123456789 S10 = 1234567891 S11 = 12345678912 ............ S18 = 123456789123456789 .......
杭電ACM1081——To The Max
開始看到這題的時候,一點頭緒都沒有,本來想用暴力解決的,可是看到n可以到100,估計了下會超時,就放棄了,想過用動歸做,但是沒有想到如何去做。就暫且放下了。 今天再看到這題,百度了下,明白瞭如何去做了,就是將各行合併,再當作最大子序列來做,就很簡單了。 n行,分
【杭電-oj】 -1060-Leftmost Digit(輸出n的n次方最左邊數)
Problem Description Given a positive integer N, you should output the leftmost digit of N^N. Input The input contains several test
【杭電oj1599】find the mincost route無向圖最小環
find the mincost route Time Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s
HDU 4968(杭電多校#9 1009題)Improving the GPA (瞎搞)
popu 推斷 imp 暴力枚舉 pop ++ pos nan sin 題目地址:HDU 4968 這題的做法是全部學科的學分情況枚舉,然後推斷在這樣的情況下是否會符合平均分。直接暴力枚舉就可以。 代碼例如以下: #include <cstring> #i
Ignatius and the Princess III(杭電1028)(母函數)
mission des panel mes content nat strong pro accepted Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others) Memory L
Choose the best route HDU杭電2680【dijkstra算法 || SPFA】
ace suppose include ria fine main from def wan http://acm.hdu.edu.cn/showproblem.php?pid=2680 Problem Description One day , Kiki wan