Detalii evaluare #48846352

Rezumat problemă

Moş Crăciun s-a dus la Polul Nord Shopping City să cumpere n cadouri pentru copiii din întreaga lume. Fiecare cadou avea un cod de bare pentru identificarea produsului, corespunzător unui număr format din nouă cifre, prima cifră fiind nenulă. La plecare şi-a amintit că-i promisese unui copil isteţ un cadou special, care să fie diferit de toate celelalte. Moş Crăciun vă roagă să găsiţi un cadou care să aibă codul de bare diferit de toate celelalte.

Detalii

Problema MerryChristmas Operații I/O tastatură/ecran
Limita timp 0.05 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #48846352 Utilizator Iancu Stefania (stefania_iancu28)
Fișier merrychristmas.cpp Dimensiune 295 B
Data încărcării 07 Februarie 2024, 11:51 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

merrychristmas.cpp:1:9: error: #include expects "FILENAME" or <FILENAME>
 #include <iostream>

         ^
merrychristmas.cpp:2:9: error: #include expects "FILENAME" or <FILENAME>
 #include <stdlib.h>

         ^
merrychristmas.cpp:3:9: error: #include expects "FILENAME" or <FILENAME>
 #include <time.h>

         ^
merrychristmas.cpp:5:1: error: stray '\302' in program
 using namespace std;

 ^
merrychristmas.cpp:5:1: error: stray '\240' in program
merrychristmas.cpp:5:1: error: stray '\302' in program
merrychristmas.cpp:5:1: error: stray '\240' in program
merrychristmas.cpp:6:1: error: stray '\302' in program
 long a,b,c ;

 ^
merrychristmas.cpp:6:1: error: stray '\240' in program
merrychristmas.cpp:6:1: error: stray '\302' in program
merrychristmas.cpp:6:1: error: stray '\240' in program
merrychristmas.cpp:8:1: error: stray '\302' in program
 int main()

 ^
merrychristmas.cpp:8:1: error: stray '\240' in program
merrychristmas.cpp:10:1: error: stray '\302' in program
     srand (time(NULL));

 ^
merrychristmas.cpp:10:1: error: stray '\240' in program
merrychristmas.cpp:10:1: error: stray '\302' in program
merrychristmas.cpp:10:1: error: stray '\240' in program
merrychristmas.cpp:10:1: error: stray '\302' in program
merrychristmas.cpp:10:1: error: stray '\240' in program
merrychristmas.cpp:10:1: error: stray '\302' in program
merrychristmas.cpp:10:1: error: stray '\240' in program
merrychristmas.cpp:10:1: error: stray '\302' in program
merrychristmas.cpp:10:1: error: stray '\240' in program
merrychristmas.cpp:11:1: error: stray '\302' in program
     a = rand()%21623+10000;

 ^
merrychristmas.cpp:11:1: error: stray '\240' in program
merrychristmas.cpp:11:1: error: stray '\302' in program
merrychristmas.cpp:11:1: error: stray '\240' in program
merrychristmas.cpp:11:1: error: stray '\302' in program
merrychristmas.cpp:11:1: error: stray '\240' in program
merrychristmas.cpp:11:1: error: stray '\302' in program
merrychristmas.cpp:11:1: error: stray '\240' in program
merrychristmas.cpp:11:1: error: stray '\302' in program
merrychristmas.cpp:11:1: error: stray '\240' in program
merrychristmas.cpp:11:1: error: stray '\302' in program
merrychristmas.cpp:11:1: error: stray '\240' in program
merrychristmas.cpp:12:1: error: stray '\302' in program
     b = rand()%21623+10000;

 ^
merrychristmas.cpp:12:1: error: stray '\240' in program
merrychristmas.cpp:12:1: error: stray '\302' in program
merrychristmas.cpp:12:1: error: stray '\240' in program
merrychristmas.cpp:12:1: error: stray '\302' in program
merrychristmas.cpp:12:1: error: stray '\240' in program
merrychristmas.cpp:12:1: error: stray '\302' in program
merrychristmas.cpp:12:1: error: stray '\240' in program
merrychristmas.cpp:12:1: error: stray '\302' in program
merrychristmas.cpp:12:1: error: stray '\240' in program
merrychristmas.cpp:12:1: error: stray '\302' in program
merrychristmas.cpp:12:1: error: stray '\240' in program
merrychristmas.cpp:13:1: error: stray '\302' in program
     c = a*b ;

 ^
merrychristmas.cpp:13:1: error: stray '\240' in program
merrychristmas.cpp:13:1: error: stray '\302' in program
merrychristmas.cpp:13:1: error: stray '\240' in program
merrychristmas.cpp:13:1: error: stray '\302' in program
merrychristmas.cpp:13:1: error: stray '\240' in program
merrychristmas.cpp:13:1: error: stray '\302' in program
merrychristmas.cpp:13:1: error: stray '\240' in program
merrychristmas.cpp:13:1: error: stray '\302' in program
merrychristmas.cpp:13:1: error: stray '\240' in program
merrychristmas.cpp:13:1: error: stray '\302' in program
merrychristmas.cpp:13:1: error: stray '\240' in program
merrychristmas.cpp:13:1: error: stray '\302' in program
merrychristmas.cpp:13:1: error: stray '\240' in program
merrychristmas.cpp:14:1: error: stray '\302' in program
     cout << c ;

 ^
merrychristmas.cpp:14:1: error: stray '\240' in program
merrychristmas.cpp:14:1: error: stray '\302' in program
merrychristmas.cpp:14:1: error: stray '\240' in program
merrychristmas.cpp:14:1: error: stray '\302' in program
merrychristmas.cpp:14:1: error: stray '\240' in program
merrychristmas.cpp:14:1: error: stray '\302' in program
merrychristmas.cpp:14:1: error: stray '\240' in program
merrychristmas.cpp:14:1: error: stray '\302' in program
merrychristmas.cpp:14:1: error: stray '\240' in program
merrychristmas.cpp:14:1: error: stray '\302' in program
merrychristmas.cpp:14:1: error: stray '\240' in program
merrychristmas.cpp:14:1: error: stray '\302' in program
merrychristmas.cpp:14:1: error: stray '\240' in program
merrychristmas.cpp:15:1: error: stray '\302' in program
     return 0;

 ^
merrychristmas.cpp:15:1: error: stray '\240' in program
merrychristmas.cpp:15:1: error: stray '\302' in program
merrychristmas.cpp:15:1: error: stray '\240' in program
merrychristmas.cpp:15:1: error: stray '\302' in program
merrychristmas.cpp:15:1: error: stray '\240' in program
merrychristmas.cpp:15:1: error: stray '\302' in program
merrychristmas.cpp:15:1: error: stray '\240' in program
merrychristmas.cpp:15:1: error: stray '\302' in program
merrychristmas.cpp:15:1: error: stray '\240' in program
merrychristmas.cpp: In function 'int main()':
merrychristmas.cpp:10:22: error: 'NULL' was not declared in this scope
     srand (time(NULL));

                      ^
merrychristmas.cpp:10:26: error: 'time' was not declared in this scope
     srand (time(NULL));

                          ^
merrychristmas.cpp:10:27: error: 'srand' was not declared in this scope
     srand (time(NULL));

                           ^
merrychristmas.cpp:11:20: error: 'rand' was not declared in this scope
     a = rand()%21623+10000;

                    ^
merrychristmas.cpp:14:9: error: 'cout' was not declared in this scope
     cout << c ;

         ^

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 MerryChristmas 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ă.