Submission #56238


ソースコード

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
48
49
50
51
52
#include<bits/stdc++.h>
using namespace std;
#define int long long
//#define int unsigned long long
#define mod 1000000007
#define INFi 2147483647
#define INFl 9223372036854775807LL
#define fi first
#define se second
#define be begin()
#define en end()
#define us unsigned //2倍
int abs(int a,int b){
int c=max(a,b)-min(a,b);
return c;
}
int gcd(int a,int b){
int c=a%b;
while(true){
if(c==0) break;
a=b;
b=c;
c=a%b;
}
return b;
}
bool IsPrime(int num){
if (num < 2) return false;
else if (num == 2) return true;
else if (num % 2 == 0) return false;
double sqrtNum = sqrt(num);
for(int i=3;i<=sqrtNum;i+=2){
if(num%i==0){
return false;
}
}
}
int b[105][10000];
signed main(){
// __builtin_ctz(N); Nを2で何回割り切れるかを返す
cin.tie(0);
ios::sync_with_stdio(false);
int a,b;
int c=1,e=0,d=0;
cin>>a>>b;
for(int i=0;i<a;i++) c*=10;
if(c%b==0) d=1;
if((c/10)%b==0) e=1;
cout<<(c/b-d)-(((((c))))/10-e)/b<<"\n";
}

ステータス

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

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in00-1.txt AC 26 ms 604 KB
1
in00-2.txt AC 25 ms 424 KB
1
in00-3.txt AC 23 ms 500 KB
1
in01.txt AC 26 ms 580 KB
1
in02.txt AC 19 ms 524 KB
1
in03.txt AC 21 ms 476 KB
1
in04.txt AC 15 ms 556 KB
1
in05.txt AC 18 ms 636 KB
1
in06.txt AC 22 ms 596 KB
1
in07.txt AC 18 ms 540 KB
1
in08.txt AC 16 ms 616 KB
1
in09.txt AC 21 ms 564 KB
1
in10.txt AC 17 ms 516 KB
1
in11.txt AC 27 ms 472 KB
1
in12.txt AC 24 ms 552 KB
1
in13.txt AC 20 ms 628 KB
1
in14.txt AC 24 ms 584 KB
1
in15.txt AC 20 ms 664 KB
1
in16.txt AC 19 ms 620 KB
1
in17.txt AC 20 ms 572 KB
1
in18.txt AC 23 ms 656 KB
1
in19.txt AC 18 ms 604 KB
1
in20.txt AC 32 ms 552 KB
1
sample01.txt AC 29 ms 504 KB
sample02.txt AC 19 ms 588 KB