I have written my code in c++14 and it is giving correct output for the 
sample test cases in Microsoft Visual studio code 2019 but run time error 
in codejam website.
Please help.

*#include<iostream>*
*#include<cstdio>*
*#include<string>*
*#include<vector>*
*#include<algorithm>*
*#include<math.h>*
*using namespace std;*
*int main()*
*{*
* int t;*
* cin >> t;*
* for (int i = 0;i < t;i++)*
* {*
* long int n, l, d;*
* cin >> n >> l;*
* vector <long int> v;*
* vector <long int> x;*
* vector <long int> z;*
* vector <long int> r;*
* vector <char> w;*
* for (long int k = 2;k <= n;k++)*
* {*
* long int a = 0;*
* for (long int m = 2;m <= sqrt(k);m++)*
* {*
* if (k % m == 0)*
* {*
* ++a;*
* }*
* }*
* if (a == 0)*
* {*
* x.push_back(k);*
* }*
* }*
* d = 0;*
* for (long int j = 0;j < l;j++)*
* {*
* long int c;*
* cin >> c;*
* v.push_back(c);*
* if (j == 0)*
* {*
* for (unsigned long int b = 2;b < x.size();b++)*
* {*
* if (v[0] % x[b] == 0)*
* {*
* z.push_back(x[b]);*
* r.push_back(x[b]);*
* d = v[0] / x[b];*
* break;*
* }*
* }*
* }*
* else*
* {*
* z.push_back(d);*
* r.push_back(d);*
* d = v[j] / d;*
* }*

* }*
* z.push_back(d);*
* r.push_back(d);*
* sort(r.begin(), r.end());*
* r.erase(unique(r.begin(), r.end()), r.end());*
* for (unsigned long int f = 0;f < z.size();f++)*
* {*
* for (unsigned long int g = 0;g < r.size();g++)*
* {*
* if (z[f] == r[g])*
* {*
* w.push_back(char(g + 64));*
* }*
* }*
* }*
* cout << "Case #" << (i + 1) << ": ";*
* for (unsigned long int h = 0;h < w.size();h++)*
* {*
* cout << w[h];*
* }*
* cout << endl;*
* }*
*}*

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/75ad61b0-3ee2-4282-bfb6-e50bdef239d3%40googlegroups.com.

Reply via email to