#939
Să se scrie un program care citeşte de la tastatura două numere naturale şi determină suma lor.
Problema | sum00 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55104937 | Utilizator | |
Fișier | sum00.cpp | Dimensiune | 3.39 KB |
Data încărcării | 24 Decembrie 2024, 00:17 | Scor / rezultat | 100 puncte |
sum00.cpp: In function 'int o_7a766fa177e7af27e92749ba0c7c83f8(int, int)': sum00.cpp:2:1652: warning: integer overflow in expression [-Woverflow] using namespace std;int o_c2ebff93fdce6adf5a49a4616d4ffb0f;int o_3d821fcdf06f62b0730bd087ef1b80aa;int o_7a766fa177e7af27e92749ba0c7c83f8(int o_7fe66ceb3c4bd81eeed4bb15b490080f,int o_0d9ac42a9a75a1555284e6ebc94a6197);int main(){cin>>o_c2ebff93fdce6adf5a49a4616d4ffb0f>>o_3d821fcdf06f62b0730bd087ef1b80aa;if ((o_c2ebff93fdce6adf5a49a4616d4ffb0f > o_3d821fcdf06f62b0730bd087ef1b80aa) & !!(o_c2ebff93fdce6adf5a49a4616d4ffb0f > o_3d821fcdf06f62b0730bd087ef1b80aa))swap(o_c2ebff93fdce6adf5a49a4616d4ffb0f,o_3d821fcdf06f62b0730bd087ef1b80aa);;int o_b0d37990e06e9523af94cb9759f99ddc=o_c2ebff93fdce6adf5a49a4616d4ffb0f % (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06) + o_3d821fcdf06f62b0730bd087ef1b80aa % (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06);o_c2ebff93fdce6adf5a49a4616d4ffb0f -= o_c2ebff93fdce6adf5a49a4616d4ffb0f % (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06);o_3d821fcdf06f62b0730bd087ef1b80aa -= o_3d821fcdf06f62b0730bd087ef1b80aa % (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06);cout<<o_7a766fa177e7af27e92749ba0c7c83f8(o_c2ebff93fdce6adf5a49a4616d4ffb0f,o_3d821fcdf06f62b0730bd087ef1b80aa) * (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06) + o_b0d37990e06e9523af94cb9759f99ddc<<'\n';return (0x0000000000000000 + 0x0000000000000200 + 0x0000000000000800 - 0x0000000000000A00);};int o_7a766fa177e7af27e92749ba0c7c83f8(int o_eb1b40e5827f908ac131d2b27a1d5381,int o_04892b8b1196a2d13b989b9813ea23b1){int o_54c26a12151cb12ee012c26a011f2f0f=-(0x0000000077359402 + 0x000000003B9ACC01 + 0x000000003B9AD201 - 0x00000000B2D06803);int o_ff09c00bc0fc5d2784666ad8d2c85a0c=(0x0000000077359400 + 0x000000003B9ACC00 + 0x000000003B9AD200 - 0x00000000B2D06800);while ((o_54c26a12151cb12ee012c26a011f2f0f <= o_ff09c00bc0fc5d2784666ad8d2c85a0c) & !!(o_54c26a12151cb12ee012c26a011f2f0f <= o_ff09c00bc0fc5d2784666ad8d2c85a0c)){int o_e4a6a2676bd14b9a6022b8b95427370f=(o_54c26a12151cb12ee012c26a011f2f0f + o_ff09c00bc0fc5d2784666ad8d2c85a0c) / (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06);if (o_04892b8b1196a2d13b989b9813ea23b1 - o_e4a6a2676bd14b9a6022b8b95427370f == o_e4a6a2676bd14b9a6022b8b95427370f - o_eb1b40e5827f908ac131d2b27a1d5381 && (o_04892b8b1196a2d13b989b9813ea23b1 - o_e4a6a2676bd14b9a6022b8b95427370f >= (0x0000000000000000 + 0x0000000000000200 + 0x0000000000000800 - 0x0000000000000A00)) & !!(o_04892b8b1196a2d13b989b9813ea23b1 - o_e4a6a2676bd14b9a6022b8b95427370f >= (0x0000000000000000 + 0x0000000000000200 + 0x0000000000000800 - 0x0000000000000A00)))return o_e4a6a2676bd14b9a6022b8b95427370f;else if ((o_04892b8b1196a2d13b989b9813ea23b1 - o_e4a6a2676bd14b9a6022b8b95427370f < o_e4a6a2676bd14b9a6022b8b95427370f - o_eb1b40e5827f908ac131d2b27a1d5381) & !!(o_04892b8b1196a2d13b989b9813ea23b1 - o_e4a6a2676bd14b9a6022b8b95427370f < o_e4a6a2676bd14b9a6022b8b95427370f - o_eb1b40e5827f908ac131d2b27a1d5381))o_ff09c00bc0fc5d2784666ad8d2c85a0c = o_e4a6a2676bd14b9a6022b8b95427370f - (0x0000000000000002 + 0x0000000000000201 + 0x0000000000000801 - 0x0000000000000A03);else o_54c26a12151cb12ee012c26a011f2f0f = o_e4a6a2676bd14b9a6022b8b95427370f + (0x0000000000000002 + 0x0000000000000201 + 0x0000000000000801 - 0x0000000000000A03);;;};return (0x0000000000000000 + 0x0000000000000200 + 0x0000000000000800 - 0x0000000000000A00);}; ^ sum00.cpp:2:1775: warning: integer overflow in expression [-Woverflow] using namespace std;int o_c2ebff93fdce6adf5a49a4616d4ffb0f;int o_3d821fcdf06f62b0730bd087ef1b80aa;int o_7a766fa177e7af27e92749ba0c7c83f8(int o_7fe66ceb3c4bd81eeed4bb15b490080f,int o_0d9ac42a9a75a1555284e6ebc94a6197);int main(){cin>>o_c2ebff93fdce6adf5a49a4616d4ffb0f>>o_3d821fcdf06f62b0730bd087ef1b80aa;if ((o_c2ebff93fdce6adf5a49a4616d4ffb0f > o_3d821fcdf06f62b0730bd087ef1b80aa) & !!(o_c2ebff93fdce6adf5a49a4616d4ffb0f > o_3d821fcdf06f62b0730bd087ef1b80aa))swap(o_c2ebff93fdce6adf5a49a4616d4ffb0f,o_3d821fcdf06f62b0730bd087ef1b80aa);;int o_b0d37990e06e9523af94cb9759f99ddc=o_c2ebff93fdce6adf5a49a4616d4ffb0f % (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06) + o_3d821fcdf06f62b0730bd087ef1b80aa % (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06);o_c2ebff93fdce6adf5a49a4616d4ffb0f -= o_c2ebff93fdce6adf5a49a4616d4ffb0f % (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06);o_3d821fcdf06f62b0730bd087ef1b80aa -= o_3d821fcdf06f62b0730bd087ef1b80aa % (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06);cout<<o_7a766fa177e7af27e92749ba0c7c83f8(o_c2ebff93fdce6adf5a49a4616d4ffb0f,o_3d821fcdf06f62b0730bd087ef1b80aa) * (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06) + o_b0d37990e06e9523af94cb9759f99ddc<<'\n';return (0x0000000000000000 + 0x0000000000000200 + 0x0000000000000800 - 0x0000000000000A00);};int o_7a766fa177e7af27e92749ba0c7c83f8(int o_eb1b40e5827f908ac131d2b27a1d5381,int o_04892b8b1196a2d13b989b9813ea23b1){int o_54c26a12151cb12ee012c26a011f2f0f=-(0x0000000077359402 + 0x000000003B9ACC01 + 0x000000003B9AD201 - 0x00000000B2D06803);int o_ff09c00bc0fc5d2784666ad8d2c85a0c=(0x0000000077359400 + 0x000000003B9ACC00 + 0x000000003B9AD200 - 0x00000000B2D06800);while ((o_54c26a12151cb12ee012c26a011f2f0f <= o_ff09c00bc0fc5d2784666ad8d2c85a0c) & !!(o_54c26a12151cb12ee012c26a011f2f0f <= o_ff09c00bc0fc5d2784666ad8d2c85a0c)){int o_e4a6a2676bd14b9a6022b8b95427370f=(o_54c26a12151cb12ee012c26a011f2f0f + o_ff09c00bc0fc5d2784666ad8d2c85a0c) / (0x0000000000000004 + 0x0000000000000202 + 0x0000000000000802 - 0x0000000000000A06);if (o_04892b8b1196a2d13b989b9813ea23b1 - o_e4a6a2676bd14b9a6022b8b95427370f == o_e4a6a2676bd14b9a6022b8b95427370f - o_eb1b40e5827f908ac131d2b27a1d5381 && (o_04892b8b1196a2d13b989b9813ea23b1 - o_e4a6a2676bd14b9a6022b8b95427370f >= (0x0000000000000000 + 0x0000000000000200 + 0x0000000000000800 - 0x0000000000000A00)) & !!(o_04892b8b1196a2d13b989b9813ea23b1 - o_e4a6a2676bd14b9a6022b8b95427370f >= (0x0000000000000000 + 0x0000000000000200 + 0x0000000000000800 - 0x0000000000000A00)))return o_e4a6a2676bd14b9a6022b8b95427370f;else if ((o_04892b8b1196a2d13b989b9813ea23b1 - o_e4a6a2676bd14b9a6022b8b95427370f < o_e4a6a2676bd14b9a6022b8b95427370f - o_eb1b40e5827f908ac131d2b27a1d5381) & !!(o_04892b8b1196a2d13b989b9813ea23b1 - o_e4a6a2676bd14b9a6022b8b95427370f < o_e4a6a2676bd14b9a6022b8b95427370f - o_eb1b40e5827f908ac131d2b27a1d5381))o_ff09c00bc0fc5d2784666ad8d2c85a0c = o_e4a6a2676bd14b9a6022b8b95427370f - (0x0000000000000002 + 0x0000000000000201 + 0x0000000000000801 - 0x0000000000000A03);else o_54c26a12151cb12ee012c26a011f2f0f = o_e4a6a2676bd14b9a6022b8b95427370f + (0x0000000000000002 + 0x0000000000000201 + 0x0000000000000801 - 0x0000000000000A03);;;};return (0x0000000000000000 + 0x0000000000000200 + 0x0000000000000800 - 0x0000000000000A00);}; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | OK. | 10 | 10 | ||
8 | 0 secunde | OK. | 10 | 10 | ||
9 | 0 secunde | OK. | 10 | 10 | Exemplu | |
10 | 0 secunde | OK. | 10 | 10 | ||
Punctaj total | 100 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sum00 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ă.