#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 | #40022927 | Utilizator | |
Fișier | prod_k.cpp | Dimensiune | 1.01 KB |
Data încărcării | 24 Noiembrie 2022, 11:26 | Scor / rezultat | Eroare de compilare |
prod_k.cpp:2:10: error: stray '#' in program Problema #3078 – prod_k – Rezolvari PBInfo ^ prod_k.cpp:2:1: error: stray '\342' in program Problema #3078 – prod_k – Rezolvari PBInfo ^ prod_k.cpp:2:1: error: stray '\200' in program prod_k.cpp:2:1: error: stray '\223' in program prod_k.cpp:2:1: error: stray '\342' in program prod_k.cpp:2:1: error: stray '\200' in program prod_k.cpp:2:1: error: stray '\223' in program prod_k.cpp:5:1: error: stray '\310' in program Cerința ^ prod_k.cpp:5:1: error: stray '\233' in program prod_k.cpp:6:1: error: stray '\310' in program 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. ^ prod_k.cpp:6:1: error: stray '\233' in program prod_k.cpp:6:1: error: stray '\310' in program prod_k.cpp:6:1: error: stray '\231' in program prod_k.cpp:6:1: error: stray '\304' in program prod_k.cpp:6:1: error: stray '\203' in program prod_k.cpp:6:1: error: stray '\310' in program prod_k.cpp:6:1: error: stray '\231' in program prod_k.cpp:6:1: error: stray '\304' in program prod_k.cpp:6:1: error: stray '\203' in program prod_k.cpp:9:1: error: stray '\310' in program Programul citește de la tastatură numărul n. ^ prod_k.cpp:9:1: error: stray '\231' in program prod_k.cpp:9:1: error: stray '\304' in program prod_k.cpp:9:1: error: stray '\203' in program prod_k.cpp:9:1: error: stray '\304' in program prod_k.cpp:9:1: error: stray '\203' in program prod_k.cpp:11:1: error: stray '\310' in program Date de ieșire ^ prod_k.cpp:11:1: error: stray '\231' in program prod_k.cpp:12:1: error: stray '\310' in program Programul va afișa pe ecran numărul P, cu semnificația din enunț. Dacă n nu conține cifre diferite de k, programul va afișa valoarea 0. ^ prod_k.cpp:12:1: error: stray '\231' in program prod_k.cpp:12:1: error: stray '\304' in program prod_k.cpp:12:1: error: stray '\203' in program prod_k.cpp:12:1: error: stray '\310' in program prod_k.cpp:12:1: error: stray '\233' in program prod_k.cpp:12:1: error: stray '\310' in program prod_k.cpp:12:1: error: stray '\233' in program prod_k.cpp:12:1: error: stray '\304' in program prod_k.cpp:12:1: error: stray '\203' in program prod_k.cpp:12:1: error: stray '\310' in program prod_k.cpp:12:1: error: stray '\233' in program prod_k.cpp:12:1: error: stray '\310' in program prod_k.cpp:12:1: error: stray '\231' in program prod_k.cpp:14:1: error: stray '\310' in program Restricții și precizări ^ prod_k.cpp:14:1: error: stray '\233' in program prod_k.cpp:14:1: error: stray '\310' in program prod_k.cpp:14:1: error: stray '\231' in program prod_k.cpp:14:1: error: stray '\304' in program prod_k.cpp:14:1: error: stray '\203' in program prod_k.cpp:15:1: error: stray '\342' in program 1 ≤ n ≤ 2.000.000.000 ^ prod_k.cpp:15:1: error: stray '\211' in program prod_k.cpp:15:1: error: stray '\244' in program prod_k.cpp:15:1: error: stray '\342' in program prod_k.cpp:15:1: error: stray '\211' in program prod_k.cpp:15:1: error: stray '\244' in program prod_k.cpp:15:13: error: too many decimal points in number 1 ≤ n ≤ 2.000.000.000 ^ prod_k.cpp:20:1: error: stray '\310' in program Ieșire ^ prod_k.cpp:20:1: error: stray '\231' in program prod_k.cpp:23:1: error: stray '\310' in program Explicație ^ prod_k.cpp:23:1: error: stray '\233' in program prod_k.cpp:24:1: error: stray '\310' in program S-a citit n=123242 iar produsul afișat este P=12 (=1*3*4). ^ prod_k.cpp:24:1: error: stray '\231' in program prod_k.cpp:2:1: error: 'Problema' does not name a type Problema #3078 – prod_k – Rezolvari PBInfo ^
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ă.