#3983
Se citesc două numere naturale n și m. Afișați în ordine descrescătoare primii n multipli nenuli ai numărului m.
| Problema | afisare_M1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64158561 | Utilizator | |
| Fișier | afisare_m1.cpp | Dimensiune | 515 B |
| Data încărcării | 20 Aprilie 2026, 22:44 | Scor/rezultat | Eroare de compilare |
afisare_m1.cpp:1:26: error: stray ‘#’ in program 1 | [22:34, 4/20/2026] huci: #include <iostream> | ^ afisare_m1.cpp:22:26: error: stray ‘#’ in program 22 | [22:34, 4/20/2026] huci: #include <bits/stdc++.h> | ^ afisare_m1.cpp:1:1: error: expected unqualified-id before ‘[’ token 1 | [22:34, 4/20/2026] huci: #include <iostream> | ^ In file included from /usr/include/c++/13/cmath:45, from afisare_m1.cpp:2: /usr/include/c++/13/ext/type_traits.h:164:35: error: ‘constexpr const bool __gnu_cxx::__is_null_pointer’ redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/13/ext/type_traits.h:159:5: note: previous declaration ‘template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)’ 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/13/ext/type_traits.h:164:26: error: ‘nullptr_t’ is not a member of ‘std’ 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ afisare_m1.cpp: In function ‘int main()’: afisare_m1.cpp:7:5: error: ‘cin’ was not declared in this scope 7 | cin >> n; | ^~~ afisare_m1.cpp:3:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? 2 | #include <cmath> +++ |+#include <iostream> 3 | using namespace std; afisare_m1.cpp:18:5: error: ‘cout’ was not declared in this scope 18 | cout << mg; | ^~~~ afisare_m1.cpp:18:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? afisare_m1.cpp: At global scope: afisare_m1.cpp:22:1: error: expected unqualified-id before ‘[’ token 22 | [22:34, 4/20/2026] huci: #include <bits/stdc++.h> | ^ afisare_m1.cpp:24:5: error: redefinition of ‘int main()’ 24 | int main() { | ^~~~ afisare_m1.cpp:5:5: note: ‘int main()’ previously defined here 5 | int main() { | ^~~~ afisare_m1.cpp: In function ‘int main()’: afisare_m1.cpp:25:12: error: ‘cin’ was not declared in this scope 25 | int n; cin >> n; | ^~~ afisare_m1.cpp:25:12: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? afisare_m1.cpp:26:5: error: ‘cout’ was not declared in this scope 26 | cout << 1; | ^~~~ afisare_m1.cpp:26:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema afisare_M1 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ă.