[Offer收割]编程练习赛54 register

Ended

Participants:154

Verdict:Accepted
Score:100 / 100
Submitted:2018-04-08 12:48:44

Lang:G++

Edit
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
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
using namespace std;
#define ms(a,b) memset(a,b,sizeof(a))
typedef long long ll;
const int inf = 0x3f3f3f3f;
const int maxn = 1e5+5;
int p, q;
int main()
{
    map<int, bool> vis;
    int v[1000005];
    ms(v, 0);
    cin >> p >> q;
    p = p%q;
    int chushu = 0;
    p *= 10;
    while(!vis[p]){
        if(p == 0)
            break;
        vis[p] = 1;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX