Detalii evaluare #23126921

Rezumat problemă

#2871 Fulger

Pentru a putea ajunge la concursul de mașini, Fulger Mcqueen, trebuie să termine de asfaltat drumul din Valea Radiator. La intrarea în Valea Radiator, Bucșă are pregătite N bidoane, fiecare având înscris pe el câte un număr. Dintre cele N bidoane doar câteva conțin asfalt.

Bucșă îi spune lui Fulger:

– Fulger, prietene, vreau să te ajut să găsești bidoanele corecte, așa că îți spun că fiecare număr de pe bidon are asociat un cod secret, codul secret al fiecărui număr se obține prin diferența dintre numărul alcătuit din atâtea cifre de 9 câte are numărul scris pe bidon și numărul de pe bidon. Bidoanele cu asfalt au cifra unităților 0 și cifra zecilor 1.

Scrieți un program care să determine:

a) Codul secret asociat fiecărui număr de pe bidon;
b) Numărul de bidoane care conțin asfalt.

OLI 2018 TIMIS - clasele V-VI

Detalii

Problema Fulger Operații I/O fulger.in/fulger.out
Limita timp 0.5 secunde Limita memorie Total: 2 MB / Stivă 2 MB
Id soluție #23126921 Utilizator Turica Andrei Cosmin (Andrei_Cosmin)
Fișier fulger.cpp Dimensiune 706 B
Data încărcării 25 Mai 2020, 15:19 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

fulger.cpp:13:1: error: stray '\302' in program
    int n, k, nr = 0, nrc, x;

 ^
fulger.cpp:13:1: error: stray '\240' in program
fulger.cpp:13:1: error: stray '\302' in program
fulger.cpp:13:1: error: stray '\240' in program
fulger.cpp:15:1: error: stray '\302' in program
    fin >> n;

 ^
fulger.cpp:15:1: error: stray '\240' in program
fulger.cpp:15:1: error: stray '\302' in program
fulger.cpp:15:1: error: stray '\240' in program
fulger.cpp:17:1: error: stray '\302' in program
    while (n){

 ^
fulger.cpp:17:1: error: stray '\240' in program
fulger.cpp:17:1: error: stray '\302' in program
fulger.cpp:17:1: error: stray '\240' in program
fulger.cpp:19:1: error: stray '\302' in program
        fin >> k;

 ^
fulger.cpp:19:1: error: stray '\240' in program
fulger.cpp:19:1: error: stray '\302' in program
fulger.cpp:19:1: error: stray '\240' in program
fulger.cpp:19:1: error: stray '\302' in program
fulger.cpp:19:1: error: stray '\240' in program
fulger.cpp:19:1: error: stray '\302' in program
fulger.cpp:19:1: error: stray '\240' in program
fulger.cpp:21:1: error: stray '\302' in program
        nrc = 0;

 ^
fulger.cpp:21:1: error: stray '\240' in program
fulger.cpp:21:1: error: stray '\302' in program
fulger.cpp:21:1: error: stray '\240' in program
fulger.cpp:21:1: error: stray '\302' in program
fulger.cpp:21:1: error: stray '\240' in program
fulger.cpp:21:1: error: stray '\302' in program
fulger.cpp:21:1: error: stray '\240' in program
fulger.cpp:23:1: error: stray '\302' in program
        x = k;

 ^
fulger.cpp:23:1: error: stray '\240' in program
fulger.cpp:23:1: error: stray '\302' in program
fulger.cpp:23:1: error: stray '\240' in program
fulger.cpp:23:1: error: stray '\302' in program
fulger.cpp:23:1: error: stray '\240' in program
fulger.cpp:23:1: error: stray '\302' in program
fulger.cpp:23:1: error: stray '\240' in program
fulger.cpp:25:1: error: stray '\302' in program
        while (x){

 ^
fulger.cpp:25:1: error: stray '\240' in program
fulger.cpp:25:1: error: stray '\302' in program
fulger.cpp:25:1: error: stray '\240' in program
fulger.cpp:25:1: error: stray '\302' in program
fulger.cpp:25:1: error: stray '\240' in program
fulger.cpp:25:1: error: stray '\302' in program
fulger.cpp:25:1: error: stray '\240' in program
fulger.cpp:27:1: error: stray '\302' in program
            nrc++;

 ^
fulger.cpp:27:1: error: stray '\240' in program
fulger.cpp:27:1: error: stray '\302' in program
fulger.cpp:27:1: error: stray '\240' in program
fulger.cpp:27:1: error: stray '\302' in program
fulger.cpp:27:1: error: stray '\240' in program
fulger.cpp:27:1: error: stray '\302' in program
fulger.cpp:27:1: error: stray '\240' in program
fulger.cpp:27:1: error: stray '\302' in program
fulger.cpp:27:1: error: stray '\240' in program
fulger.cpp:27:1: error: stray '\302' in program
fulger.cpp:27:1: error: stray '\240' in program
fulger.cpp:29:1: error: stray '\302' in program
            x /= 10;

 ^
fulger.cpp:29:1: error: stray '\240' in program
fulger.cpp:29:1: error: stray '\302' in program
fulger.cpp:29:1: error: stray '\240' in program
fulger.cpp:29:1: error: stray '\302' in program
fulger.cpp:29:1: error: stray '\240' in program
fulger.cpp:29:1: error: stray '\302' in program
fulger.cpp:29:1: error: stray '\240' in program
fulger.cpp:29:1: error: stray '\302' in program
fulger.cpp:29:1: error: stray '\240' in program
fulger.cpp:29:1: error: stray '\302' in program
fulger.cpp:29:1: error: stray '\240' in program
fulger.cpp:31:1: error: stray '\302' in program
        }

 ^
fulger.cpp:31:1: error: stray '\240' in program
fulger.cpp:31:1: error: stray '\302' in program
fulger.cpp:31:1: error: stray '\240' in program
fulger.cpp:31:1: error: stray '\302' in program
fulger.cpp:31:1: error: stray '\240' in program
fulger.cpp:31:1: error: stray '\302' in program
fulger.cpp:31:1: error: stray '\240' in program
fulger.cpp:33:1: error: stray '\302' in program
        x = (float)pow (10, nrc)-1;

 ^
fulger.cpp:33:1: error: stray '\240' in program
fulger.cpp:33:1: error: stray '\302' in program
fulger.cpp:33:1: error: stray '\240' in program
fulger.cpp:33:1: error: stray '\302' in program
fulger.cpp:33:1: error: stray '\240' in program
fulger.cpp:33:1: error: stray '\302' in program
fulger.cpp:33:1: error: stray '\240' in program
fulger.cpp:35:1: error: stray '\302' in program
        x = x-k;

 ^
fulger.cpp:35:1: error: stray '\240' in program
fulger.cpp:35:1: error: stray '\302' in program
fulger.cpp:35:1: error: stray '\240' in program
fulger.cpp:35:1: error: stray '\302' in program
fulger.cpp:35:1: error: stray '\240' in program
fulger.cpp:35:1: error: stray '\302' in program
fulger.cpp:35:1: error: stray '\240' in program
fulger.cpp:37:1: error: stray '\302' in program
        fout << x << " ";

 ^
fulger.cpp:37:1: error: stray '\240' in program
fulger.cpp:37:1: error: stray '\302' in program
fulger.cpp:37:1: error: stray '\240' in program
fulger.cpp:37:1: error: stray '\302' in program
fulger.cpp:37:1: error: stray '\240' in program
fulger.cpp:37:1: error: stray '\302' in program
fulger.cpp:37:1: error: stray '\240' in program
fulger.cpp:39:1: error: stray '\302' in program
        if (x%10 == 0){

 ^
fulger.cpp:39:1: error: stray '\240' in program
fulger.cpp:39:1: error: stray '\302' in program
fulger.cpp:39:1: error: stray '\240' in program
fulger.cpp:39:1: error: stray '\302' in program
fulger.cpp:39:1: error: stray '\240' in program
fulger.cpp:39:1: error: stray '\302' in program
fulger.cpp:39:1: error: stray '\240' in program
fulger.cpp:41:1: error: stray '\302' in program
            x /= 10;

 ^
fulger.cpp:41:1: error: stray '\240' in program
fulger.cpp:41:1: error: stray '\302' in program
fulger.cpp:41:1: error: stray '\240' in program
fulger.cpp:41:1: error: stray '\302' in program
fulger.cpp:41:1: error: stray '\240' in program
fulger.cpp:41:1: error: stray '\302' in program
fulger.cpp:41:1: error: stray '\240' in program
fulger.cpp:41:1: error: stray '\302' in program
fulger.cpp:41:1: error: stray '\240' in program
fulger.cpp:41:1: error: stray '\302' in program
fulger.cpp:41:1: error: stray '\240' in program
fulger.cpp:43:1: error: stray '\302' in program
            if (x%10 == 1)

 ^
fulger.cpp:43:1: error: stray '\240' in program
fulger.cpp:43:1: error: stray '\302' in program
fulger.cpp:43:1: error: stray '\240' in program
fulger.cpp:43:1: error: stray '\302' in program
fulger.cpp:43:1: error: stray '\240' in program
fulger.cpp:43:1: error: stray '\302' in program
fulger.cpp:43:1: error: stray '\240' in program
fulger.cpp:43:1: error: stray '\302' in program
fulger.cpp:43:1: error: stray '\240' in program
fulger.cpp:43:1: error: stray '\302' in program
fulger.cpp:43:1: error: stray '\240' in program
fulger.cpp:45:1: error: stray '\302' in program
                nr++;

 ^
fulger.cpp:45:1: error: stray '\240' in program
fulger.cpp:45:1: error: stray '\302' in program
fulger.cpp:45:1: error: stray '\240' in program
fulger.cpp:45:1: error: stray '\302' in program
fulger.cpp:45:1: error: stray '\240' in program
fulger.cpp:45:1: error: stray '\302' in program
fulger.cpp:45:1: error: stray '\240' in program
fulger.cpp:45:1: error: stray '\302' in program
fulger.cpp:45:1: error: stray '\240' in program
fulger.cpp:45:1: error: stray '\302' in program
fulger.cpp:45:1: error: stray '\240' in program
fulger.cpp:45:1: error: stray '\302' in program
fulger.cpp:45:1: error: stray '\240' in program
fulger.cpp:45:1: error: stray '\302' in program
fulger.cpp:45:1: error: stray '\240' in program
fulger.cpp:47:1: error: stray '\302' in program
        }

 ^
fulger.cpp:47:1: error: stray '\240' in program
fulger.cpp:47:1: error: stray '\302' in program
fulger.cpp:47:1: error: stray '\240' in program
fulger.cpp:47:1: error: stray '\302' in program
fulger.cpp:47:1: error: stray '\240' in program
fulger.cpp:47:1: error: stray '\302' in program
fulger.cpp:47:1: error: stray '\240' in program
fulger.cpp:49:1: error: stray '\302' in program
        n--;

 ^
fulger.cpp:49:1: error: stray '\240' in program
fulger.cpp:49:1: error: stray '\302' in program
fulger.cpp:49:1: error: stray '\240' in program
fulger.cpp:49:1: error: stray '\302' in program
fulger.cpp:49:1: error: stray '\240' in program
fulger.cpp:49:1: error: stray '\302' in program
fulger.cpp:49:1: error: stray '\240' in program
fulger.cpp:51:1: error: stray '\302' in program
    }

 ^
fulger.cpp:51:1: error: stray '\240' in program
fulger.cpp:51:1: error: stray '\302' in program
fulger.cpp:51:1: error: stray '\240' in program
fulger.cpp:53:1: error: stray '\302' in program
    fout << '\n' << nr;

 ^
fulger.cpp:53:1: error: stray '\240' in program
fulger.cpp:53:1: error: stray '\302' in program
fulger.cpp:53:1: error: stray '\240' in program
fulger.cpp:55:1: error: stray '\302' in program
   

 ^
fulger.cpp:55:1: error: stray '\240' in program
fulger.cpp:57:1: error: stray '\302' in program
    return 0;

 ^
fulger.cpp:57:1: error: stray '\240' in program
fulger.cpp:57:1: error: stray '\302' in program
fulger.cpp:57:1: 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 Fulger 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ă.