#3081
TruncatableLeft
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
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 | |
Fișier | truncatableleft.cpp | Dimensiune | 539 B |
Data încărcării | 06 Aprilie 2020, 21:03 | Scor / rezultat | Eroare de 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
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema TruncatableLeft face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
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ă.