blob: da8e64baebdfd089117d33507c65a8273b417dab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#include <stdio.h>
int nextInt () {
int r = 0;
int minus = 0;
for (int števka = '0'; števka == '-' || (števka <= '9' && števka >= '0'); števka = getchar()) {
if (števka == '-') {
if (r != 0)
break;
minus = !minus;
continue;
}
r = r*10+števka-'0';
}
return minus ? -r : r;
}
void printInt (int a) {
if (a < 0) {
a = -a;
putchar('-');
}
int števke[29];
int len = 0;
while (a > 0) {
števke[len++] = a%10;
a /= 10;
}
for (int i = len-1; i >= 0; i--)
putchar('0'+števke[i]);
}
int main (void) {
printInt(nextInt()+nextInt());
putchar('\n');
return 0;
}
|