Submission #56338
ソースコード
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #include<bits/stdc++.h> #define F first #define S second #define endl '\n' #define lcm( a, b ) ((a)/__gcd(a,b)*(b)) #define MP make_pair #define pb push_back #define all(x) (x).begin(),(x).end() using namespace std; typedef long long LL; typedef pair< int , int > P; typedef pair< int , P> iP; typedef pair< LL, LL > LP; const int INF = INT_MAX; const int MIN = INT_MIN; const LL LINF = LLONG_MAX; const int MOD = 1000000000 + 7; const int SIZE = 300005; vector< int > Div( int n ) { vector< int > ret; for ( int i = 1; i * i <= n; ++i ) { if ( n % i == 0 ) { ret.pb( i ); if ( i * i != n ) ret.pb( n / i ); } } sort( all( ret ) ); return ret; } int main() { cin.tie(0); ios::sync_with_stdio( false ); LL n, k; cin >> n >> k; LL d = 1; for ( int i = 0; i < n - 1; ++i ) d *= 10; cout << (d * 10 - 1) / k - (d - 1) / k << endl; return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 1204 - Password |
ユーザー名 | crom |
投稿日時 | 2019-11-12 18:32:36 |
言語 | C++11 |
状態 | Accepted |
得点 | 10 |
ソースコード長 | 995 Byte |
最大実行時間 | 27 ms |
最大メモリ使用量 | 800 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 10 / 10 | in* |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in00-1.txt | AC | 24 ms | 604 KB |
1
|
in00-2.txt | AC | 14 ms | 684 KB |
1
|
in00-3.txt | AC | 19 ms | 516 KB |
1
|
in01.txt | AC | 21 ms | 596 KB |
1
|
in02.txt | AC | 20 ms | 552 KB |
1
|
in03.txt | AC | 20 ms | 512 KB |
1
|
in04.txt | AC | 18 ms | 592 KB |
1
|
in05.txt | AC | 17 ms | 544 KB |
1
|
in06.txt | AC | 15 ms | 368 KB |
1
|
in07.txt | AC | 27 ms | 448 KB |
1
|
in08.txt | AC | 18 ms | 528 KB |
1
|
in09.txt | AC | 20 ms | 484 KB |
1
|
in10.txt | AC | 18 ms | 572 KB |
1
|
in11.txt | AC | 18 ms | 528 KB |
1
|
in12.txt | AC | 22 ms | 488 KB |
1
|
in13.txt | AC | 17 ms | 572 KB |
1
|
in14.txt | AC | 23 ms | 656 KB |
1
|
in15.txt | AC | 21 ms | 608 KB |
1
|
in16.txt | AC | 20 ms | 560 KB |
1
|
in17.txt | AC | 22 ms | 516 KB |
1
|
in18.txt | AC | 23 ms | 596 KB |
1
|
in19.txt | AC | 21 ms | 680 KB |
1
|
in20.txt | AC | 21 ms | 636 KB |
1
|
sample01.txt | AC | 26 ms | 720 KB | |
sample02.txt | AC | 20 ms | 800 KB |