Detalii evaluare #23011226

Rezumat problemă

Determinaţi numărul de apariţii a unei cifre c în reprezentarea tuturor numerelor mai mici sau egale cu un n dat.

Detalii

Problema AparitiiCifra Operații I/O aparitiicifra.in/aparitiicifra.out
Limita timp 0.1 secunde Limita memorie Total: 2 MB / Stivă 1 MB
Id soluție #23011226 Utilizator Neacsu Ana-Maria (AnaMN)
Fișier aparitiicifra.cpp Dimensiune 491 B
Data încărcării 18 Mai 2020, 13:00 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

aparitiicifra.cpp:4:1: error: stray '\302' in program
 using namespace std;

 ^
aparitiicifra.cpp:4:1: error: stray '\240' in program
aparitiicifra.cpp:4:1: error: stray '\302' in program
aparitiicifra.cpp:4:1: error: stray '\240' in program
aparitiicifra.cpp:5:1: error: stray '\302' in program
 ifstream fin("aparitiicifra.in");

 ^
aparitiicifra.cpp:5:1: error: stray '\240' in program
aparitiicifra.cpp:6:1: error: stray '\302' in program
 ofstream fout("aparitiicifra.out");

 ^
aparitiicifra.cpp:6:1: error: stray '\240' in program
aparitiicifra.cpp:8:1: error: stray '\302' in program
 int k,c,p,s,n;

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

 ^
aparitiicifra.cpp:9:1: error: stray '\240' in program
aparitiicifra.cpp:10:1: error: stray '\302' in program
 {  

 ^
aparitiicifra.cpp:10:1: error: stray '\240' in program
aparitiicifra.cpp:10:1: error: stray '\302' in program
aparitiicifra.cpp:10:1: error: stray '\240' in program
aparitiicifra.cpp:12:1: error: stray '\302' in program
     p=1;

 ^
aparitiicifra.cpp:12:1: error: stray '\240' in program
aparitiicifra.cpp:12:1: error: stray '\302' in program
aparitiicifra.cpp:12:1: error: stray '\240' in program
aparitiicifra.cpp:12:1: error: stray '\302' in program
aparitiicifra.cpp:12:1: error: stray '\240' in program
aparitiicifra.cpp:12:1: error: stray '\302' in program
aparitiicifra.cpp:12:1: error: stray '\240' in program
aparitiicifra.cpp:13:1: error: stray '\302' in program
     n=k;

 ^
aparitiicifra.cpp:13:1: error: stray '\240' in program
aparitiicifra.cpp:13:1: error: stray '\302' in program
aparitiicifra.cpp:13:1: error: stray '\240' in program
aparitiicifra.cpp:13:1: error: stray '\302' in program
aparitiicifra.cpp:13:1: error: stray '\240' in program
aparitiicifra.cpp:13:1: error: stray '\302' in program
aparitiicifra.cpp:13:1: error: stray '\240' in program
aparitiicifra.cpp:14:1: error: stray '\302' in program
     while(k)

 ^
aparitiicifra.cpp:14:1: error: stray '\240' in program
aparitiicifra.cpp:14:1: error: stray '\302' in program
aparitiicifra.cpp:14:1: error: stray '\240' in program
aparitiicifra.cpp:14:1: error: stray '\302' in program
aparitiicifra.cpp:14:1: error: stray '\240' in program
aparitiicifra.cpp:14:1: error: stray '\302' in program
aparitiicifra.cpp:14:1: error: stray '\240' in program
aparitiicifra.cpp:15:1: error: stray '\302' in program
     {

 ^
aparitiicifra.cpp:15:1: error: stray '\240' in program
aparitiicifra.cpp:15:1: error: stray '\302' in program
aparitiicifra.cpp:15:1: error: stray '\240' in program
aparitiicifra.cpp:15:1: error: stray '\302' in program
aparitiicifra.cpp:15:1: error: stray '\240' in program
aparitiicifra.cpp:15:1: error: stray '\302' in program
aparitiicifra.cpp:15:1: error: stray '\240' in program
aparitiicifra.cpp:16:1: error: stray '\302' in program
         if(k%10>c) s=s+(k/10+1)*p;

 ^
aparitiicifra.cpp:16:1: error: stray '\240' in program
aparitiicifra.cpp:16:1: error: stray '\302' in program
aparitiicifra.cpp:16:1: error: stray '\240' in program
aparitiicifra.cpp:16:1: error: stray '\302' in program
aparitiicifra.cpp:16:1: error: stray '\240' in program
aparitiicifra.cpp:16:1: error: stray '\302' in program
aparitiicifra.cpp:16:1: error: stray '\240' in program
aparitiicifra.cpp:16:1: error: stray '\302' in program
aparitiicifra.cpp:16:1: error: stray '\240' in program
aparitiicifra.cpp:16:1: error: stray '\302' in program
aparitiicifra.cpp:16:1: error: stray '\240' in program
aparitiicifra.cpp:16:1: error: stray '\302' in program
aparitiicifra.cpp:16:1: error: stray '\240' in program
aparitiicifra.cpp:16:1: error: stray '\302' in program
aparitiicifra.cpp:16:1: error: stray '\240' in program
aparitiicifra.cpp:16:1: error: stray '\302' in program
aparitiicifra.cpp:16:1: error: stray '\240' in program
aparitiicifra.cpp:17:1: error: stray '\302' in program
         if(k%10<c) s=s+(k/10)*p;

 ^
aparitiicifra.cpp:17:1: error: stray '\240' in program
aparitiicifra.cpp:17:1: error: stray '\302' in program
aparitiicifra.cpp:17:1: error: stray '\240' in program
aparitiicifra.cpp:17:1: error: stray '\302' in program
aparitiicifra.cpp:17:1: error: stray '\240' in program
aparitiicifra.cpp:17:1: error: stray '\302' in program
aparitiicifra.cpp:17:1: error: stray '\240' in program
aparitiicifra.cpp:17:1: error: stray '\302' in program
aparitiicifra.cpp:17:1: error: stray '\240' in program
aparitiicifra.cpp:17:1: error: stray '\302' in program
aparitiicifra.cpp:17:1: error: stray '\240' in program
aparitiicifra.cpp:17:1: error: stray '\302' in program
aparitiicifra.cpp:17:1: error: stray '\240' in program
aparitiicifra.cpp:17:1: error: stray '\302' in program
aparitiicifra.cpp:17:1: error: stray '\240' in program
aparitiicifra.cpp:17:1: error: stray '\302' in program
aparitiicifra.cpp:17:1: error: stray '\240' in program
aparitiicifra.cpp:18:1: error: stray '\302' in program
         if(k%10==c) s=s+(k/10)*p+n%p+1;

 ^
aparitiicifra.cpp:18:1: error: stray '\240' in program
aparitiicifra.cpp:18:1: error: stray '\302' in program
aparitiicifra.cpp:18:1: error: stray '\240' in program
aparitiicifra.cpp:18:1: error: stray '\302' in program
aparitiicifra.cpp:18:1: error: stray '\240' in program
aparitiicifra.cpp:18:1: error: stray '\302' in program
aparitiicifra.cpp:18:1: error: stray '\240' in program
aparitiicifra.cpp:18:1: error: stray '\302' in program
aparitiicifra.cpp:18:1: error: stray '\240' in program
aparitiicifra.cpp:18:1: error: stray '\302' in program
aparitiicifra.cpp:18:1: error: stray '\240' in program
aparitiicifra.cpp:18:1: error: stray '\302' in program
aparitiicifra.cpp:18:1: error: stray '\240' in program
aparitiicifra.cpp:18:1: error: stray '\302' in program
aparitiicifra.cpp:18:1: error: stray '\240' in program
aparitiicifra.cpp:18:1: error: stray '\302' in program
aparitiicifra.cpp:18:1: error: stray '\240' in program
aparitiicifra.cpp:19:1: error: stray '\302' in program
         k/=10;

 ^
aparitiicifra.cpp:19:1: error: stray '\240' in program
aparitiicifra.cpp:19:1: error: stray '\302' in program
aparitiicifra.cpp:19:1: error: stray '\240' in program
aparitiicifra.cpp:19:1: error: stray '\302' in program
aparitiicifra.cpp:19:1: error: stray '\240' in program
aparitiicifra.cpp:19:1: error: stray '\302' in program
aparitiicifra.cpp:19:1: error: stray '\240' in program
aparitiicifra.cpp:19:1: error: stray '\302' in program
aparitiicifra.cpp:19:1: error: stray '\240' in program
aparitiicifra.cpp:19:1: error: stray '\302' in program
aparitiicifra.cpp:19:1: error: stray '\240' in program
aparitiicifra.cpp:19:1: error: stray '\302' in program
aparitiicifra.cpp:19:1: error: stray '\240' in program
aparitiicifra.cpp:19:1: error: stray '\302' in program
aparitiicifra.cpp:19:1: error: stray '\240' in program
aparitiicifra.cpp:20:1: error: stray '\302' in program
         p*=10;

 ^
aparitiicifra.cpp:20:1: error: stray '\240' in program
aparitiicifra.cpp:20:1: error: stray '\302' in program
aparitiicifra.cpp:20:1: error: stray '\240' in program
aparitiicifra.cpp:20:1: error: stray '\302' in program
aparitiicifra.cpp:20:1: error: stray '\240' in program
aparitiicifra.cpp:20:1: error: stray '\302' in program
aparitiicifra.cpp:20:1: error: stray '\240' in program
aparitiicifra.cpp:20:1: error: stray '\302' in program
aparitiicifra.cpp:20:1: error: stray '\240' in program
aparitiicifra.cpp:20:1: error: stray '\302' in program
aparitiicifra.cpp:20:1: error: stray '\240' in program
aparitiicifra.cpp:20:1: error: stray '\302' in program
aparitiicifra.cpp:20:1: error: stray '\240' in program
aparitiicifra.cpp:20:1: error: stray '\302' in program
aparitiicifra.cpp:20:1: error: stray '\240' in program
aparitiicifra.cpp:21:1: error: stray '\302' in program
     }

 ^
aparitiicifra.cpp:21:1: error: stray '\240' in program
aparitiicifra.cpp:21:1: error: stray '\302' in program
aparitiicifra.cpp:21:1: error: stray '\240' in program
aparitiicifra.cpp:21:1: error: stray '\302' in program
aparitiicifra.cpp:21:1: error: stray '\240' in program
aparitiicifra.cpp:21:1: error: stray '\302' in program
aparitiicifra.cpp:21:1: error: stray '\240' in program
aparitiicifra.cpp:22:1: error: stray '\302' in program
     fout<<s;

 ^
aparitiicifra.cpp:22:1: error: stray '\240' in program
aparitiicifra.cpp:22:1: error: stray '\302' in program
aparitiicifra.cpp:22:1: error: stray '\240' in program
aparitiicifra.cpp:22:1: error: stray '\302' in program
aparitiicifra.cpp:22:1: error: stray '\240' in program
aparitiicifra.cpp:22:1: error: stray '\302' in program
aparitiicifra.cpp:22:1: error: stray '\240' in program
aparitiicifra.cpp:23:1: error: stray '\302' in program
     return 0;

 ^
aparitiicifra.cpp:23:1: error: stray '\240' in program
aparitiicifra.cpp:23:1: error: stray '\302' in program
aparitiicifra.cpp:23:1: error: stray '\240' in program
aparitiicifra.cpp:23:1: error: stray '\302' in program
aparitiicifra.cpp:23:1: error: stray '\240' in program
aparitiicifra.cpp:23:1: error: stray '\302' in program
aparitiicifra.cpp:23:1: error: stray '\240' in program
aparitiicifra.cpp:23:1: error: stray '\302' in program
aparitiicifra.cpp:23: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 AparitiiCifra 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ă.