ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1086. Cryptography

помогите help Visual C++ 2010 Runtime error (access violation) 2 0.64 260 КБ
Posted by DeDaRm 5 Dec 2013 17:53
#include <iostream>
using namespace std;

int main ()
{

    int n[1755],z=2,a=0,y,t=0;
    for (z=2;z<=15000;z++)
    {
        for (int i=1; i<=z; ++i)
        {
            y=z/i;
            if (y*i==z)
            {
                a=a+1;
            }
        }
        if (a==2)
        {
            n[t]=z;
            t++;
        }
        a=0;
    }

    int x;
    cin >> x;
    int *b=new int[x];
    for (int e=0; e<x; ++e)
    {
        cin >> b[e];
    }
    cout << "\n" << "\n";
    for (int e=0; e<x; ++e)
    {
        cout << n[b[e]-1] << " ";
    }
    system ("pause > void");
}
Re: помогите help Visual C++ 2010 Runtime error (access violation) 2 0.64 260 КБ
Posted by Anton Malyuta 5 Dec 2013 19:01
Delete: system ("pause > void");
Re: помогите help Visual C++ 2010 Runtime error (access violation) 2 0.64 260 КБ
Posted by DeDaRm 5 Dec 2013 19:34
now  Visual C++ 2010   Runtime error (access violation)    2    0.64    260 КБ