Detalii evaluare #22366936

Rezumat problemă

Un număr prim se numește trunchiabil-stânga dacă, prin eliminare repetată a primei cifre, toate numerele rezultate sunt prime.
Se dă un număr natural, să se verifice dacă numărul este trunchiabil-stânga.

Inspirată din Numberphile - 357686312646216567629137

Detalii

Problema TruncatableLeft Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #22366936 Utilizator Sultan Marian (Sultzzy)
Fișier truncatableleft.cpp Dimensiune 539 B
Data încărcării 06 Aprilie 2020, 21:03 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

truncatableleft.cpp:4:1: error: stray '\302' in program
 {  long long unsigned a, cp, pp=1, ok=1, inv=0, d;

 ^
truncatableleft.cpp:4:1: error: stray '\240' in program
truncatableleft.cpp:6:1: error: stray '\302' in program
    cp=a;

 ^
truncatableleft.cpp:6:1: error: stray '\240' in program
truncatableleft.cpp:6:1: error: stray '\302' in program
truncatableleft.cpp:6:1: error: stray '\240' in program
truncatableleft.cpp:7:1: error: stray '\302' in program
    while(cp)

 ^
truncatableleft.cpp:7:1: error: stray '\240' in program
truncatableleft.cpp:7:1: error: stray '\302' in program
truncatableleft.cpp:7:1: error: stray '\240' in program
truncatableleft.cpp:8:1: error: stray '\302' in program
    {

 ^
truncatableleft.cpp:8:1: error: stray '\240' in program
truncatableleft.cpp:8:1: error: stray '\302' in program
truncatableleft.cpp:8:1: error: stray '\240' in program
truncatableleft.cpp:9:1: error: stray '\302' in program
        inv=inv*10+cp%10;

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

 ^
truncatableleft.cpp:10:1: error: stray '\240' in program
truncatableleft.cpp:10:1: error: stray '\302' in program
truncatableleft.cpp:10:1: error: stray '\240' in program
truncatableleft.cpp:10:1: error: stray '\302' in program
truncatableleft.cpp:10:1: error: stray '\240' in program
truncatableleft.cpp:10:1: error: stray '\302' in program
truncatableleft.cpp:10:1: error: stray '\240' in program
truncatableleft.cpp:11:8: error: stray '\302' in program
        cp=cp/10;  }

        ^
truncatableleft.cpp:11:8: error: stray '\240' in program
truncatableleft.cpp:13:1: error: stray '\302' in program
    for(d=2; d<=a/2; d++)

 ^
truncatableleft.cpp:13:1: error: stray '\240' in program
truncatableleft.cpp:13:1: error: stray '\302' in program
truncatableleft.cpp:13:1: error: stray '\240' in program
truncatableleft.cpp:14:1: error: stray '\302' in program
       

 ^
truncatableleft.cpp:14:1: error: stray '\240' in program
truncatableleft.cpp:14:1: error: stray '\302' in program
truncatableleft.cpp:14:1: error: stray '\240' in program
truncatableleft.cpp:14:1: error: stray '\302' in program
truncatableleft.cpp:14:1: error: stray '\240' in program
truncatableleft.cpp:16:1: error: stray '\302' in program
        

 ^
truncatableleft.cpp:16:1: error: stray '\240' in program
truncatableleft.cpp:16:1: error: stray '\302' in program
truncatableleft.cpp:16:1: error: stray '\240' in program
truncatableleft.cpp:16:1: error: stray '\302' in program
truncatableleft.cpp:16:1: error: stray '\240' in program
truncatableleft.cpp:16:1: error: stray '\302' in program
truncatableleft.cpp:16:1: error: stray '\240' in program
truncatableleft.cpp:18:1: error: stray '\302' in program
    

 ^
truncatableleft.cpp:18:1: error: stray '\240' in program
truncatableleft.cpp:18:1: error: stray '\302' in program
truncatableleft.cpp:18:1: error: stray '\240' in program
truncatableleft.cpp:20:1: error: stray '\302' in program
        

 ^
truncatableleft.cpp:20:1: error: stray '\240' in program
truncatableleft.cpp:20:1: error: stray '\302' in program
truncatableleft.cpp:20:1: error: stray '\240' in program
truncatableleft.cpp:20:1: error: stray '\302' in program
truncatableleft.cpp:20:1: error: stray '\240' in program
truncatableleft.cpp:20:1: error: stray '\302' in program
truncatableleft.cpp:20:1: error: stray '\240' in program
truncatableleft.cpp:22:1: error: stray '\302' in program
        

 ^
truncatableleft.cpp:22:1: error: stray '\240' in program
truncatableleft.cpp:22:1: error: stray '\302' in program
truncatableleft.cpp:22:1: error: stray '\240' in program
truncatableleft.cpp:22:1: error: stray '\302' in program
truncatableleft.cpp:22:1: error: stray '\240' in program
truncatableleft.cpp:22:1: error: stray '\302' in program
truncatableleft.cpp:22:1: error: stray '\240' in program
truncatableleft.cpp:24:1: error: stray '\302' in program
        

 ^
truncatableleft.cpp:24:1: error: stray '\240' in program
truncatableleft.cpp:24:1: error: stray '\302' in program
truncatableleft.cpp:24:1: error: stray '\240' in program
truncatableleft.cpp:24:1: error: stray '\302' in program
truncatableleft.cpp:24:1: error: stray '\240' in program
truncatableleft.cpp:24:1: error: stray '\302' in program
truncatableleft.cpp:24:1: error: stray '\240' in program
truncatableleft.cpp:29:1: error: stray '\302' in program
            else

 ^
truncatableleft.cpp:29:1: error: stray '\240' in program
truncatableleft.cpp:29:1: error: stray '\302' in program
truncatableleft.cpp:29:1: error: stray '\240' in program
truncatableleft.cpp:31:1: error: stray '\302' in program
        cout<<"NU";

 ^
truncatableleft.cpp:31:1: error: stray '\240' in program
truncatableleft.cpp:31:1: error: stray '\302' in program
truncatableleft.cpp:31:1: error: stray '\240' in program
truncatableleft.cpp:31:1: error: stray '\302' in program
truncatableleft.cpp:31:1: error: stray '\240' in program
truncatableleft.cpp:31:1: error: stray '\302' in program
truncatableleft.cpp:31:1: error: stray '\240' in program
truncatableleft.cpp:33:1: error: stray '\302' in program
    return 0;

 ^
truncatableleft.cpp:33:1: error: stray '\240' in program
truncatableleft.cpp:33:1: error: stray '\302' in program
truncatableleft.cpp:33: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 TruncatableLeft 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ă.