Bad Directions

시간 제한1초메모리 제한2048 MB

요약
한 자리 키를 수의 각 자리에 더하되 올림을 버리고, 자릿수를 그대로 유지해 출력합니다.
난이도

쉬움10점 중 2점

유형
구현, 수학
정답자
아직 제출이 없습니다

문제

Due to the empire's strict control over the galaxy, one of the Rebels droids, A-P5, started to encrypt the distance of hyperspace jumps so that the empire is unable to track the rebel fleet. You are currently being followed by the empire and must calculate the jump to hyperspace. Your incompetent droid co-pilot failed to download the correct decryption program back on the base. Thus, in order to get the proper hyperspace coordinates, you must write a program to decrypt the hyperspace distance you will travel.

Decryption involves two numbers. The first number will be the decryption key, and the second is the number to decrypt. In order to decrypt the number, you must take the key and add it to each digit of the encrypted number. Any carried digits should be removed.

입력

The first line of input consists of a single integer tt (1≤t<1001 \le t < 100), which indicates the number of test cases that follow.

Each test case consists of a single line containing two integers: kk (0≤k≤90 \le k \le 9), which indicates the encryption key, and nn (1≤n<2311 \le n < 2^{31}), which indicates the encrypted number. nn will never have any leading zeroes.

출력

For each test case, output the decrypted number on its own line. Be sure to include leading zeroes in your output as necessary so that the output has the same number of digits as nn.

예제1

  1. 예제 1

    입력
    3
    1 12345
    5 98765
    9 55555
    
    예상 출력
    23456
    43210
    44444