Detalii evaluare #16348636

Rezumat problemă

#1001 Rotund

Spunem că un număr natural x este rotund dacă există un număr natural nenul k, mai mic strict decât numărul de cifre ale lui x, astfel încât prin permutarea circulară a cifrelor numărului cu k poziţii la dreapta, să se obţină numărul iniţial x.

Se dă un şir cu n elemente, numere naturale. câte elemente din șir sunt rotunde, și care sunt acestea.

Se va defini şi apela subprogramul rotund care verifică dacă un număr natural, transmis ca parametru, este rotund.

Detalii

Problema Rotund Operații I/O rotund.in/rotund.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #16348636 Utilizator Cozma Catalin (CozmaCatalinSW)
Fișier rotund.cpp Dimensiune 1.36 KB
Data încărcării 16 Iulie 2019, 12:32 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

rotund.cpp:19:2: error: stray '\302' in program
    int copie=m, gasit=0, j, nrcif=0, k=0, t;

  ^
rotund.cpp:19:2: error: stray '\240' in program
rotund.cpp:21:2: error: stray '\302' in program
    if (m<10) gasit=0;

  ^
rotund.cpp:21:2: error: stray '\240' in program
rotund.cpp:23:2: error: stray '\302' in program
    else

  ^
rotund.cpp:23:2: error: stray '\240' in program
rotund.cpp:25:2: error: stray '\302' in program
    {

  ^
rotund.cpp:25:2: error: stray '\240' in program
rotund.cpp:27:2: error: stray '\302' in program
         while (copie)

  ^
rotund.cpp:27:2: error: stray '\240' in program
rotund.cpp:27:2: error: stray '\302' in program
rotund.cpp:27:2: error: stray '\240' in program
rotund.cpp:27:2: error: stray '\302' in program
rotund.cpp:27:2: error: stray '\240' in program
rotund.cpp:27:2: error: stray '\302' in program
rotund.cpp:27:2: error: stray '\240' in program
rotund.cpp:29:2: error: stray '\302' in program
         {

  ^
rotund.cpp:29:2: error: stray '\240' in program
rotund.cpp:29:2: error: stray '\302' in program
rotund.cpp:29:2: error: stray '\240' in program
rotund.cpp:29:2: error: stray '\302' in program
rotund.cpp:29:2: error: stray '\240' in program
rotund.cpp:29:2: error: stray '\302' in program
rotund.cpp:29:2: error: stray '\240' in program
rotund.cpp:31:2: error: stray '\302' in program
             ++nrcif;

  ^
rotund.cpp:31:2: error: stray '\240' in program
rotund.cpp:31:2: error: stray '\302' in program
rotund.cpp:31:2: error: stray '\240' in program
rotund.cpp:31:2: error: stray '\302' in program
rotund.cpp:31:2: error: stray '\240' in program
rotund.cpp:31:2: error: stray '\302' in program
rotund.cpp:31:2: error: stray '\240' in program
rotund.cpp:31:2: error: stray '\302' in program
rotund.cpp:31:2: error: stray '\240' in program
rotund.cpp:31:2: error: stray '\302' in program
rotund.cpp:31:2: error: stray '\240' in program
rotund.cpp:33:2: error: stray '\302' in program
             c[nrcif]=copie%10;

  ^
rotund.cpp:33:2: error: stray '\240' in program
rotund.cpp:33:2: error: stray '\302' in program
rotund.cpp:33:2: error: stray '\240' in program
rotund.cpp:33:2: error: stray '\302' in program
rotund.cpp:33:2: error: stray '\240' in program
rotund.cpp:33:2: error: stray '\302' in program
rotund.cpp:33:2: error: stray '\240' in program
rotund.cpp:33:2: error: stray '\302' in program
rotund.cpp:33:2: error: stray '\240' in program
rotund.cpp:33:2: error: stray '\302' in program
rotund.cpp:33:2: error: stray '\240' in program
rotund.cpp:35:2: error: stray '\302' in program
             copie=copie/10;

  ^
rotund.cpp:35:2: error: stray '\240' in program
rotund.cpp:35:2: error: stray '\302' in program
rotund.cpp:35:2: error: stray '\240' in program
rotund.cpp:35:2: error: stray '\302' in program
rotund.cpp:35:2: error: stray '\240' in program
rotund.cpp:35:2: error: stray '\302' in program
rotund.cpp:35:2: error: stray '\240' in program
rotund.cpp:35:2: error: stray '\302' in program
rotund.cpp:35:2: error: stray '\240' in program
rotund.cpp:35:2: error: stray '\302' in program
rotund.cpp:35:2: error: stray '\240' in program
rotund.cpp:37:2: error: stray '\302' in program
         }

  ^
rotund.cpp:37:2: error: stray '\240' in program
rotund.cpp:37:2: error: stray '\302' in program
rotund.cpp:37:2: error: stray '\240' in program
rotund.cpp:37:2: error: stray '\302' in program
rotund.cpp:37:2: error: stray '\240' in program
rotund.cpp:37:2: error: stray '\302' in program
rotund.cpp:37:2: error: stray '\240' in program
rotund.cpp:39:2: error: stray '\302' in program
         for (j=1; j<=nrcif/2; ++j) { swap(c[j],c[nrcif+1-j]);}

  ^
rotund.cpp:39:2: error: stray '\240' in program
rotund.cpp:39:2: error: stray '\302' in program
rotund.cpp:39:2: error: stray '\240' in program
rotund.cpp:39:2: error: stray '\302' in program
rotund.cpp:39:2: error: stray '\240' in program
rotund.cpp:39:2: error: stray '\302' in program
rotund.cpp:39:2: error: stray '\240' in program
rotund.cpp:41:2: error: stray '\302' in program
         for (j=1; j<=nrcif; ++j) { d[j]=c[j]; }

  ^
rotund.cpp:41:2: error: stray '\240' in program
rotund.cpp:41:2: error: stray '\302' in program
rotund.cpp:41:2: error: stray '\240' in program
rotund.cpp:41:2: error: stray '\302' in program
rotund.cpp:41:2: error: stray '\240' in program
rotund.cpp:41:2: error: stray '\302' in program
rotund.cpp:41:2: error: stray '\240' in program
rotund.cpp:43:2: error: stray '\302' in program
         while (gasit==0 && k+1<nrcif)

  ^
rotund.cpp:43:2: error: stray '\240' in program
rotund.cpp:43:2: error: stray '\302' in program
rotund.cpp:43:2: error: stray '\240' in program
rotund.cpp:43:2: error: stray '\302' in program
rotund.cpp:43:2: error: stray '\240' in program
rotund.cpp:43:2: error: stray '\302' in program
rotund.cpp:43:2: error: stray '\240' in program
rotund.cpp:45:2: error: stray '\302' in program
         {

  ^
rotund.cpp:45:2: error: stray '\240' in program
rotund.cpp:45:2: error: stray '\302' in program
rotund.cpp:45:2: error: stray '\240' in program
rotund.cpp:45:2: error: stray '\302' in program
rotund.cpp:45:2: error: stray '\240' in program
rotund.cpp:45:2: error: stray '\302' in program
rotund.cpp:45:2: error: stray '\240' in program
rotund.cpp:47:2: error: stray '\302' in program
             t=d[nrcif];

  ^
rotund.cpp:47:2: error: stray '\240' in program
rotund.cpp:47:2: error: stray '\302' in program
rotund.cpp:47:2: error: stray '\240' in program
rotund.cpp:47:2: error: stray '\302' in program
rotund.cpp:47:2: error: stray '\240' in program
rotund.cpp:47:2: error: stray '\302' in program
rotund.cpp:47:2: error: stray '\240' in program
rotund.cpp:47:2: error: stray '\302' in program
rotund.cpp:47:2: error: stray '\240' in program
rotund.cpp:47:2: error: stray '\302' in program
rotund.cpp:47:2: error: stray '\240' in program
rotund.cpp:49:2: error: stray '\302' in program
             for (j=nrcif; j>1; --j) { d[j]=d[j-1];}

  ^
rotund.cpp:49:2: error: stray '\240' in program
rotund.cpp:49:2: error: stray '\302' in program
rotund.cpp:49:2: error: stray '\240' in program
rotund.cpp:49:2: error: stray '\302' in program
rotund.cpp:49:2: error: stray '\240' in program
rotund.cpp:49:2: error: stray '\302' in program
rotund.cpp:49:2: error: stray '\240' in program
rotund.cpp:49:2: error: stray '\302' in program
rotund.cpp:49:2: error: stray '\240' in program
rotund.cpp:49:2: error: stray '\302' in program
rotund.cpp:49:2: error: stray '\240' in program
rotund.cpp:51:2: error: stray '\302' in program
             d[j]=t; ++k;

  ^
rotund.cpp:51:2: error: stray '\240' in program
rotund.cpp:51:2: error: stray '\302' in program
rotund.cpp:51:2: error: stray '\240' in program
rotund.cpp:51:2: error: stray '\302' in program
rotund.cpp:51:2: error: stray '\240' in program
rotund.cpp:51:2: error: stray '\302' in program
rotund.cpp:51:2: error: stray '\240' in program
rotund.cpp:51:2: error: stray '\302' in program
rotund.cpp:51:2: error: stray '\240' in program
rotund.cpp:51:2: error: stray '\302' in program
rotund.cpp:51:2: error: stray '\240' in program
rotund.cpp:53:2: error: stray '\302' in program
             gasit=1;

  ^
rotund.cpp:53:2: error: stray '\240' in program
rotund.cpp:53:2: error: stray '\302' in program
rotund.cpp:53:2: error: stray '\240' in program
rotund.cpp:53:2: error: stray '\302' in program
rotund.cpp:53:2: error: stray '\240' in program
rotund.cpp:53:2: error: stray '\302' in program
rotund.cpp:53:2: error: stray '\240' in program
rotund.cpp:53:2: error: stray '\302' in program
rotund.cpp:53:2: error: stray '\240' in program
rotund.cpp:53:2: error: stray '\302' in program
rotund.cpp:53:2: error: stray '\240' in program
rotund.cpp:55:2: error: stray '\302' in program
             for (j=1; j<=nrcif; ++j)

  ^
rotund.cpp:55:2: error: stray '\240' in program
rotund.cpp:55:2: error: stray '\302' in program
rotund.cpp:55:2: error: stray '\240' in program
rotund.cpp:55:2: error: stray '\302' in program
rotund.cpp:55:2: error: stray '\240' in program
rotund.cpp:55:2: error: stray '\302' in program
rotund.cpp:55:2: error: stray '\240' in program
rotund.cpp:55:2: error: stray '\302' in program
rotund.cpp:55:2: error: stray '\240' in program
rotund.cpp:55:2: error: stray '\302' in program
rotund.cpp:55:2: error: stray '\240' in program
rotund.cpp:57:2: error: stray '\302' in program
                 if (c[j]!=d[j]) { gasit=0; break; }

  ^
rotund.cpp:57:2: error: stray '\240' in program
rotund.cpp:57:2: error: stray '\302' in program
rotund.cpp:57:2: error: stray '\240' in program
rotund.cpp:57:2: error: stray '\302' in program
rotund.cpp:57:2: error: stray '\240' in program
rotund.cpp:57:2: error: stray '\302' in program
rotund.cpp:57:2: error: stray '\240' in program
rotund.cpp:57:2: error: stray '\302' in program
rotund.cpp:57:2: error: stray '\240' in program
rotund.cpp:57:2: error: stray '\302' in program
rotund.cpp:57:2: error: stray '\240' in program
rotund.cpp:57:2: error: stray '\302' in program
rotund.cpp:57:2: error: stray '\240' in program
rotund.cpp:57:2: error: stray '\302' in program
rotund.cpp:57:2: error: stray '\240' in program
rotund.cpp:59:2: error: stray '\302' in program
         }

  ^
rotund.cpp:59:2: error: stray '\240' in program
rotund.cpp:59:2: error: stray '\302' in program
rotund.cpp:59:2: error: stray '\240' in program
rotund.cpp:59:2: error: stray '\302' in program
rotund.cpp:59:2: error: stray '\240' in program
rotund.cpp:59:2: error: stray '\302' in program
rotund.cpp:59:2: error: stray '\240' in program
rotund.cpp:61:2: error: stray '\302' in program
    }

  ^
rotund.cpp:61:2: error: stray '\240' in program
rotund.cpp:63:2: error: stray '\302' in program
    if (gasit) return true;

  ^
rotund.cpp:63:2: error: stray '\240' in program
rotund.cpp:65:2: error: stray '\302' in program
    else return false;

  ^
rotund.cpp:65:2: error: stray '\240' in program
rotund.cpp:73:2: error: stray '\302' in program
     f >> n;

  ^
rotund.cpp:73:2: error: stray '\240' in program
rotund.cpp:73:2: error: stray '\302' in program
rotund.cpp:73:2: error: stray '\240' in program
rotund.cpp:75:2: error: stray '\302' in program
     for (i=1; i<=n; ++i)

  ^
rotund.cpp:75:2: error: stray '\240' in program
rotund.cpp:75:2: error: stray '\302' in program
rotund.cpp:75:2: error: stray '\240' in program
rotund.cpp:77:2: error: stray '\302' in program
     {

  ^
rotund.cpp:77:2: error: stray '\240' in program
rotund.cpp:77:2: error: stray '\302' in program
rotund.cpp:77:2: error: stray '\240' in program
rotund.cpp:79:2: error: stray '\302' in program
         f >> num;

  ^
rotund.cpp:79:2: error: stray '\240' in program
rotund.cpp:79:2: error: stray '\302' in program
rotund.cpp:79:2: error: stray '\240' in program
rotund.cpp:79:2: error: stray '\302' in program
rotund.cpp:79:2: error: stray '\240' in program
rotund.cpp:79:2: error: stray '\302' in program
rotund.cpp:79:2: error: stray '\240' in program
rotund.cpp:81:2: error: stray '\302' in program
         if (rotund(num))

  ^
rotund.cpp:81:2: error: stray '\240' in program
rotund.cpp:81:2: error: stray '\302' in program
rotund.cpp:81:2: error: stray '\240' in program
rotund.cpp:81:2: error: stray '\302' in program
rotund.cpp:81:2: error: stray '\240' in program
rotund.cpp:81:2: error: stray '\302' in program
rotund.cpp:81:2: error: stray '\240' in program
rotund.cpp:83:2: error: stray '\302' in program
         {

  ^
rotund.cpp:83:2: error: stray '\240' in program
rotund.cpp:83:2: error: stray '\302' in program
rotund.cpp:83:2: error: stray '\240' in program
rotund.cpp:83:2: error: stray '\302' in program
rotund.cpp:83:2: error: stray '\240' in program
rotund.cpp:83:2: error: stray '\302' in program
rotund.cpp:83:2: error: stray '\240' in program
rotund.cpp:85:2: error: stray '\302' in program
             ++contor;

  ^
rotund.cpp:85:2: error: stray '\240' in program
rotund.cpp:85:2: error: stray '\302' in program
rotund.cpp:85:2: error: stray '\240' in program
rotund.cpp:85:2: error: stray '\302' in program
rotund.cpp:85:2: error: stray '\240' in program
rotund.cpp:85:2: error: stray '\302' in program
rotund.cpp:85:2: error: stray '\240' in program
rotund.cpp:85:2: error: stray '\302' in program
rotund.cpp:85:2: error: stray '\240' in program
rotund.cpp:85:2: error: stray '\302' in program
rotund.cpp:85:2: error: stray '\240' in program
rotund.cpp:87:2: error: stray '\302' in program
             r[contor]=num;

  ^
rotund.cpp:87:2: error: stray '\240' in program
rotund.cpp:87:2: error: stray '\302' in program
rotund.cpp:87:2: error: stray '\240' in program
rotund.cpp:87:2: error: stray '\302' in program
rotund.cpp:87:2: error: stray '\240' in program
rotund.cpp:87:2: error: stray '\302' in program
rotund.cpp:87:2: error: stray '\240' in program
rotund.cpp:87:2: error: stray '\302' in program
rotund.cpp:87:2: error: stray '\240' in program
rotund.cpp:87:2: error: stray '\302' in program
rotund.cpp:87:2: error: stray '\240' in program
rotund.cpp:89:2: error: stray '\302' in program
         }

  ^
rotund.cpp:89:2: error: stray '\240' in program
rotund.cpp:89:2: error: stray '\302' in program
rotund.cpp:89:2: error: stray '\240' in program
rotund.cpp:89:2: error: stray '\302' in program
rotund.cpp:89:2: error: stray '\240' in program
rotund.cpp:89:2: error: stray '\302' in program
rotund.cpp:89:2: error: stray '\240' in program
rotund.cpp:91:2: error: stray '\302' in program
     }

  ^
rotund.cpp:91:2: error: stray '\240' in program
rotund.cpp:91:2: error: stray '\302' in program
rotund.cpp:91:2: error: stray '\240' in program
rotund.cpp:93:2: error: stray '\302' in program
     g << contor << "\n";

  ^
rotund.cpp:93:2: error: stray '\240' in program
rotund.cpp:93:2: error: stray '\302' in program
rotund.cpp:93:2: error: stray '\240' in program
rotund.cpp:95:2: error: stray '\302' in program
     if (contor)

  ^
rotund.cpp:95:2: error: stray '\240' in program
rotund.cpp:95:2: error: stray '\302' in program
rotund.cpp:95:2: error: stray '\240' in program
rotund.cpp:97:2: error: stray '\302' in program
         for (i=1; i<=contor; ++i)

  ^
rotund.cpp:97:2: error: stray '\240' in program
rotund.cpp:97:2: error: stray '\302' in program
rotund.cpp:97:2: error: stray '\240' in program
rotund.cpp:97:2: error: stray '\302' in program
rotund.cpp:97:2: error: stray '\240' in program
rotund.cpp:97:2: error: stray '\302' in program
rotund.cpp:97:2: error: stray '\240' in program
rotund.cpp:99:2: error: stray '\302' in program
             g << r[i] << " ";

  ^
rotund.cpp:99:2: error: stray '\240' in program
rotund.cpp:99:2: error: stray '\302' in program
rotund.cpp:99:2: error: stray '\240' in program
rotund.cpp:99:2: error: stray '\302' in program
rotund.cpp:99:2: error: stray '\240' in program
rotund.cpp:99:2: error: stray '\302' in program
rotund.cpp:99:2: error: stray '\240' in program
rotund.cpp:99:2: error: stray '\302' in program
rotund.cpp:99:2: error: stray '\240' in program
rotund.cpp:99:2: error: stray '\302' in program
rotund.cpp:99:2: error: stray '\240' in program

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema Rotund face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.