func_code_string: #include <bits/stdc++.h>   using namespace std;   int ToInt(string& s, int len) {     int r = 0;     for (int i = 0, max_ = (len); i < max_; ++i) {       r *= 10;       r += s[i] -  0 ;     }     return r;   }   int GCD(int a, int b) { return b != 0 ? GCD(b, a % b) : a; }   int LCM(int a, int b) { return a * (b / GCD(a, b)); }   long long Pow(long long n, long long e) {     if (e == 0) return 1;     if (e == 1)       return n;     else if (e & 1) {       long long t = Pow(n, e / 2);       return n * t * t;     } else {       long long t = Pow(n, e / 2);       return t * t;     }   }   vector<int> v[100005];   bool usedDiv[100005], usedCol[100005];   int divID[100005];   int main() {     int N, M;     scanf( %d %d , &N, &M);     for (int i = (1), max_ = (N + 1); i < max_; ++i) {       int j = 1;       while (j * j <= i) {         if (i % j == 0) {           if (j != 1) v[i].push_back(j);           v[i].push_back(i / j);         }         ++j;       }     }     char c;     int n;     for (int i = 0, max_ = (M); i < max_; ++i) {       cin >> c >> n;       if (c ==  + ) {         if (usedCol[n])           printf( Already on n );         else {           int collisionWith = -1;           bool collision = false;           for (int j = 0, max_ = ((int)(v[n]).size()); j < max_; ++j)             if (usedDiv[v[n][j]]) {               collision = true;               collisionWith = divID[v[n][j]];               break;             }           if (collision) {             printf( Conflict with %d n , collisionWith);           } else {             printf( Success n );             usedCol[n] = true;             for (int j = 0, max_ = ((int)(v[n]).size()); j < max_; ++j) {               usedDiv[v[n][j]] = true;               divID[v[n][j]] = n;             }           }         }       } else if (c ==  - ) {         if (!usedCol[n])           printf( Already off n );         else {           printf( Success n );           usedCol[n] = false;           for (int j = 0, max_ = ((int)(v[n]).size()); j < max_; ++j)             usedDiv[v[n][j]] = false;         }       }     }     return 0;   }   