#943
Suma4
Se dă n
un număr natural nenul. Să se afle ultima cifră a sumei S=1
4
+ 2
4
+ 3
4
+ ... + n
4
.
Problema | Suma4 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #16562276 | Utilizator | |
Fișier | suma4.cpp | Dimensiune | 852 B |
Data încărcării | 02 Septembrie 2019, 22:09 | Scor / rezultat | Eroare de compilare |
suma4.cpp:1:9: error: #include expects "FILENAME" or <FILENAME> #include <iostream> ^ suma4.cpp:3:1: error: stray '\302' in program using namespace std; ^ suma4.cpp:3:1: error: stray '\240' in program suma4.cpp:3:1: error: stray '\302' in program suma4.cpp:3:1: error: stray '\240' in program suma4.cpp:5:1: error: stray '\302' in program int n; ^ suma4.cpp:5:1: error: stray '\240' in program suma4.cpp:7:1: error: stray '\302' in program int main() ^ suma4.cpp:7:1: error: stray '\240' in program suma4.cpp:10:1: error: stray '\302' in program cin >> n; ^ suma4.cpp:10:1: error: stray '\240' in program suma4.cpp:10:1: error: stray '\302' in program suma4.cpp:10:1: error: stray '\240' in program suma4.cpp:10:1: error: stray '\302' in program suma4.cpp:10:1: error: stray '\240' in program suma4.cpp:10:1: error: stray '\302' in program suma4.cpp:10:1: error: stray '\240' in program suma4.cpp:10:1: error: stray '\302' in program suma4.cpp:10:1: error: stray '\240' in program suma4.cpp:10:1: error: stray '\302' in program suma4.cpp:10:1: error: stray '\240' in program suma4.cpp:12:1: error: stray '\302' in program int c=n/10; ^ suma4.cpp:12:1: error: stray '\240' in program suma4.cpp:12:1: error: stray '\302' in program suma4.cpp:12:1: error: stray '\240' in program suma4.cpp:12:1: error: stray '\302' in program suma4.cpp:12:1: error: stray '\240' in program suma4.cpp:12:1: error: stray '\302' in program suma4.cpp:12:1: error: stray '\240' in program suma4.cpp:12:1: error: stray '\302' in program suma4.cpp:12:1: error: stray '\240' in program suma4.cpp:13:1: error: stray '\302' in program int r=n%10; ^ suma4.cpp:13:1: error: stray '\240' in program suma4.cpp:13:1: error: stray '\302' in program suma4.cpp:13:1: error: stray '\240' in program suma4.cpp:13:1: error: stray '\302' in program suma4.cpp:13:1: error: stray '\240' in program suma4.cpp:13:1: error: stray '\302' in program suma4.cpp:13:1: error: stray '\240' in program suma4.cpp:13:1: error: stray '\302' in program suma4.cpp:13:1: error: stray '\240' in program suma4.cpp:15:1: error: stray '\302' in program switch(r) ^ suma4.cpp:15:1: error: stray '\240' in program suma4.cpp:15:1: error: stray '\302' in program suma4.cpp:15:1: error: stray '\240' in program suma4.cpp:15:1: error: stray '\302' in program suma4.cpp:15:1: error: stray '\240' in program suma4.cpp:15:1: error: stray '\302' in program suma4.cpp:15:1: error: stray '\240' in program suma4.cpp:16:1: error: stray '\302' in program { ^ suma4.cpp:16:1: error: stray '\240' in program suma4.cpp:16:1: error: stray '\302' in program suma4.cpp:16:1: error: stray '\240' in program suma4.cpp:16:1: error: stray '\302' in program suma4.cpp:16:1: error: stray '\240' in program suma4.cpp:16:1: error: stray '\302' in program suma4.cpp:16:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program case 0 : cout << ((c*3)%10)%10; break; ^ suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:17:1: error: stray '\302' in program suma4.cpp:17:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program case 1 : cout << ((c*3)%10+1)%10; break; ^ suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:18:1: error: stray '\302' in program suma4.cpp:18:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program case 2 : cout << ((c*3)%10+7)%10; break; ^ suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:19:1: error: stray '\302' in program suma4.cpp:19:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program case 3 : cout << ((c*3)%10+8)%10; break; ^ suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:20:1: error: stray '\302' in program suma4.cpp:20:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program case 4 : cout << ((c*3)%10+14)%10; break; ^ suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:21:1: error: stray '\302' in program suma4.cpp:21:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program case 5 : cout << ((c*3)%10+19)%10; break; ^ suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:22:1: error: stray '\302' in program suma4.cpp:22:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program case 6 : cout << ((c*3)%10+25)%10; break; ^ suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:23:1: error: stray '\302' in program suma4.cpp:23:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program case 7 : cout << ((c*3)%10+26)%10; break; ^ suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:24:1: error: stray '\302' in program suma4.cpp:24:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program case 8 : cout << ((c*3)%10+32)%10; break; ^ suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:25:1: error: stray '\302' in program suma4.cpp:25:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program case 9 : cout << ((c*3)%10+33)%10; break; ^ suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:26:1: error: stray '\302' in program suma4.cpp:26:1: error: stray '\240' in program suma4.cpp:27:1: error: stray '\302' in program } ^ suma4.cpp:27:1: error: stray '\240' in program suma4.cpp:27:1: error: stray '\302' in program suma4.cpp:27:1: error: stray '\240' in program suma4.cpp:27:1: error: stray '\302' in program suma4.cpp:27:1: error: stray '\240' in program suma4.cpp:27:1: error: stray '\302' in program suma4.cpp:27:1: error: stray '\240' in program suma4.cpp: In function 'int main()': suma4.cpp:10:9: error: 'cin' was not declared in this scope cin >> n; ^ suma4.cpp:17:29: error: 'cout' was not declared in this scope case 0 : cout << ((c*3)%10)%10; break; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Suma4 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ă.