Submission #56253


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <bits/stdc++.h>
using namespace std;
#define long long long
#define itn int
long power10 ( int r ) {
long ans = 1;
for ( int i = 0; i < r; i++ ) {
ans *= 10;
}
return ans;
}
signed main ( ) {
long n, k;
cin >> n >> k;
long end = power10(n)-1;
long begin = power10(n-1)-1;
cout << (end/k) - (begin/k) << endl;
return 0;
}

ステータス

項目 データ
問題 1204 - Password
ユーザー名 r1825
投稿日時 2019-11-07 17:44:57
言語 C++14
状態 Accepted
得点 10
ソースコード長 407 Byte
最大実行時間 29 ms
最大メモリ使用量 720 KB

セット

セット 得点 Cases
1 ALL 10 / 10 in*

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in00-1.txt AC 19 ms 604 KB
1
in00-2.txt AC 25 ms 580 KB
1
in00-3.txt AC 25 ms 420 KB
1
in01.txt AC 22 ms 392 KB
1
in02.txt AC 20 ms 496 KB
1
in03.txt AC 16 ms 596 KB
1
in04.txt AC 26 ms 436 KB
1
in05.txt AC 20 ms 412 KB
1
in06.txt AC 20 ms 512 KB
1
in07.txt AC 22 ms 480 KB
1
in08.txt AC 22 ms 580 KB
1
in09.txt AC 25 ms 552 KB
1
in10.txt AC 19 ms 528 KB
1
in11.txt AC 29 ms 624 KB
1
in12.txt AC 21 ms 720 KB
1
in13.txt AC 19 ms 692 KB
1
in14.txt AC 25 ms 664 KB
1
in15.txt AC 21 ms 508 KB
1
in16.txt AC 23 ms 480 KB
1
in17.txt AC 20 ms 580 KB
1
in18.txt AC 25 ms 556 KB
1
in19.txt AC 22 ms 524 KB
1
in20.txt AC 25 ms 492 KB
1
sample01.txt AC 28 ms 464 KB
sample02.txt AC 26 ms 560 KB