TOPIC
time limit exceeded
THIAGODEAZEVEDOZANINI asked 3 years ago
include
int main(){ int N, M, x, S; int unidades[9]; scanf("%d %d", &N, &M); while(N!=0 || M!=0){ S=N+M; for(x=0; x<=10; x++){ unidades[x] = S%10; S=S/10; } for(x=10; x>=0; x--){ if(unidades[x] != 0){ printf("%d", unidades[x]); } } } printf("\n"); return 0; }
This topic has not been answered yet. Be the first!