#3078
prod_k
Scrieți un program care citește un număr natural n
și o cifră k
. Programul va calcula produsul P
al cifrelor lui n
diferite de cifra k
.
Problema | prod_k | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #22945617 | Utilizator | |
Fișier | prod_k.cpp | Dimensiune | 333 B |
Data încărcării | 14 Mai 2020, 09:44 | Scor / rezultat | Eroare de compilare |
prod_k.cpp:6:1: error: stray '\302' in program cin >> n >> k; ^ prod_k.cpp:6:1: error: stray '\240' in program prod_k.cpp:6:1: error: stray '\302' in program prod_k.cpp:6:1: error: stray '\240' in program prod_k.cpp:7:1: error: stray '\302' in program while (n) ^ prod_k.cpp:7:1: error: stray '\240' in program prod_k.cpp:7:1: error: stray '\302' in program prod_k.cpp:7:1: error: stray '\240' in program prod_k.cpp:8:1: error: stray '\302' in program { ^ prod_k.cpp:8:1: error: stray '\240' in program prod_k.cpp:8:1: error: stray '\302' in program prod_k.cpp:8:1: error: stray '\240' in program prod_k.cpp:9:1: error: stray '\302' in program cif=n%10; ^ prod_k.cpp:9:1: error: stray '\240' in program prod_k.cpp:9:1: error: stray '\302' in program prod_k.cpp:9:1: error: stray '\240' in program prod_k.cpp:9:1: error: stray '\302' in program prod_k.cpp:9:1: error: stray '\240' in program prod_k.cpp:9:1: error: stray '\302' in program prod_k.cpp:9:1: error: stray '\240' in program prod_k.cpp:10:1: error: stray '\302' in program if (cif!=k) ^ prod_k.cpp:10:1: error: stray '\240' in program prod_k.cpp:10:1: error: stray '\302' in program prod_k.cpp:10:1: error: stray '\240' in program prod_k.cpp:10:1: error: stray '\302' in program prod_k.cpp:10:1: error: stray '\240' in program prod_k.cpp:10:1: error: stray '\302' in program prod_k.cpp:10:1: error: stray '\240' in program prod_k.cpp:11:1: error: stray '\302' in program { ^ prod_k.cpp:11:1: error: stray '\240' in program prod_k.cpp:11:1: error: stray '\302' in program prod_k.cpp:11:1: error: stray '\240' in program prod_k.cpp:11:1: error: stray '\302' in program prod_k.cpp:11:1: error: stray '\240' in program prod_k.cpp:11:1: error: stray '\302' in program prod_k.cpp:11:1: error: stray '\240' in program prod_k.cpp:12:1: error: stray '\302' in program exista=1; p*=cif; ^ prod_k.cpp:12:1: error: stray '\240' in program prod_k.cpp:12:1: error: stray '\302' in program prod_k.cpp:12:1: error: stray '\240' in program prod_k.cpp:12:1: error: stray '\302' in program prod_k.cpp:12:1: error: stray '\240' in program prod_k.cpp:12:1: error: stray '\302' in program prod_k.cpp:12:1: error: stray '\240' in program prod_k.cpp:12:1: error: stray '\302' in program prod_k.cpp:12:1: error: stray '\240' in program prod_k.cpp:12:1: error: stray '\302' in program prod_k.cpp:12:1: error: stray '\240' in program prod_k.cpp:13:1: error: stray '\302' in program } ^ prod_k.cpp:13:1: error: stray '\240' in program prod_k.cpp:13:1: error: stray '\302' in program prod_k.cpp:13:1: error: stray '\240' in program prod_k.cpp:13:1: error: stray '\302' in program prod_k.cpp:13:1: error: stray '\240' in program prod_k.cpp:13:1: error: stray '\302' in program prod_k.cpp:13:1: error: stray '\240' in program prod_k.cpp:14:1: error: stray '\302' in program n/=10; ^ prod_k.cpp:14:1: error: stray '\240' in program prod_k.cpp:14:1: error: stray '\302' in program prod_k.cpp:14:1: error: stray '\240' in program prod_k.cpp:14:1: error: stray '\302' in program prod_k.cpp:14:1: error: stray '\240' in program prod_k.cpp:14:1: error: stray '\302' in program prod_k.cpp:14:1: error: stray '\240' in program prod_k.cpp:15:1: error: stray '\302' in program } ^ prod_k.cpp:15:1: error: stray '\240' in program prod_k.cpp:15:1: error: stray '\302' in program prod_k.cpp:15:1: error: stray '\240' in program prod_k.cpp:16:1: error: stray '\302' in program if (exista) cout << p; ^ prod_k.cpp:16:1: error: stray '\240' in program prod_k.cpp:16:1: error: stray '\302' in program prod_k.cpp:16:1: error: stray '\240' in program prod_k.cpp:17:1: error: stray '\302' in program else cout << 0; ^ prod_k.cpp:17:1: error: stray '\240' in program prod_k.cpp:17:1: error: stray '\302' in program prod_k.cpp:17:1: error: stray '\240' in program prod_k.cpp:18:1: error: stray '\302' in program return 0; ^ prod_k.cpp:18:1: error: stray '\240' in program prod_k.cpp:18:1: error: stray '\302' in program prod_k.cpp:18:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema prod_k 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ă.