#355
Se dau n numere întregi. Calculaţi cel mai mic dintre cele n numere date.
| Problema | n_minim | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #61074089 | Utilizator | |
| Fișier | n_minim.cpp | Dimensiune | 748 B |
| Data încărcării | 18 Noiembrie 2025, 18:34 | Scor/rezultat | Eroare de compilare |
n_minim.cpp: In function 'int main()': n_minim.cpp:3:21: error: 'std::chrono' has not been declared auto now = std::chrono::system_clock::now(); ^ n_minim.cpp:5:5: error: 'time_t' is not a member of 'std' std::time_t currentTime = std::chrono::system_clock::to_time_t(now); ^ n_minim.cpp:5:17: error: expected ';' before 'currentTime' std::time_t currentTime = std::chrono::system_clock::to_time_t(now); ^ n_minim.cpp:6:5: error: 'tm' is not a member of 'std' std::tm* localTime = std::localtime(¤tTime); ^ n_minim.cpp:6:14: error: 'localTime' was not declared in this scope std::tm* localTime = std::localtime(¤tTime); ^ n_minim.cpp:6:26: error: 'localtime' is not a member of 'std' std::tm* localTime = std::localtime(¤tTime); ^ n_minim.cpp:6:42: error: 'currentTime' was not declared in this scope std::tm* localTime = std::localtime(¤tTime); ^ n_minim.cpp:8:5: error: 'cout' is not a member of 'std' std::cout << "The current time is: "; ^ n_minim.cpp:10:5: error: 'cout' is not a member of 'std' std::cout << std::put_time(localTime, "%H:%M:%S") << std::endl; ^ n_minim.cpp:10:18: error: 'put_time' is not a member of 'std' std::cout << std::put_time(localTime, "%H:%M:%S") << std::endl; ^ n_minim.cpp:10:58: error: 'endl' is not a member of 'std' std::cout << std::put_time(localTime, "%H:%M:%S") << std::endl; ^ n_minim.cpp:12:5: error: 'cout' is not a member of 'std' std::cout << "The current date is: "; ^ n_minim.cpp:14:5: error: 'cout' is not a member of 'std' std::cout << std::put_time(localTime, "%d-%m-%Y") << std::endl; ^ n_minim.cpp:14:18: error: 'put_time' is not a member of 'std' std::cout << std::put_time(localTime, "%d-%m-%Y") << std::endl; ^ n_minim.cpp:14:58: error: 'endl' is not a member of 'std' std::cout << std::put_time(localTime, "%d-%m-%Y") << std::endl; ^ n_minim.cpp:17:5: error: 'cout' is not a member of 'std' std::cout << "The current location is: Slatina" << std::endl; ^ n_minim.cpp:17:56: error: 'endl' is not a member of 'std' std::cout << "The current location is: Slatina" << std::endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema n_minim 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ă.