Problem11307--[yosupo] Big Integer - Multiplication of Hex Big Integers

11307: [yosupo] Big Integer - Multiplication of Hex Big Integers

[Creator : ]
Time Limit : 4.000 sec  Memory Limit : 512 MiB

Description

This problem has $T$ cases.  
Given hexadecimal integers $A$ and $B$, print hexadecimal integer $AB$.

Input

$T$
$A$ $B$
 $\vdots$
$A$ $B$

Output

$AB$
 $\vdots$
$AB$

Constraints

- $1 \leq T \leq 160000$
- $0 \leq |A|, |B| < 16^{16\times 10^5}$
- The sum of (the number of characters in $A$) $+$ (the number of characters in $B$) over all test cases does not exceed $3,200,002$.

Sample 1 Input

9
47 FF
50 FF
3 -FF
0 -FF
-A0 -EFE
1234567890ABCDEF1234567890ABCDEF FEDCBA9876543210FEDCBA9876543210
-1234567890ABCDEF1234567890ABCDEF FEDCBA9876543210FEDCBA9876543210
-1234567890ABCDEF1234567890ABCDEF -FEDCBA9876543210FEDCBA9876543210
1234567890ABCDEF1234567890ABCDEF -1234567890ABCDEF1234567890ABCDEF

Sample 1 Output

46B9
4FB0
-2FD
0
95EC0
121FA00ACD77D74247ACC913F0513B7458FAB207783AF122236D88FE55618CF0
-121FA00ACD77D74247ACC913F0513B7458FAB207783AF122236D88FE55618CF0
121FA00ACD77D74247ACC913F0513B7458FAB207783AF122236D88FE55618CF0
-14B66DC328828BCA8DE2CC20802F69A4DDA24EF786D72FEA6475F09A2F2A521

HINT

Yosupo.

Source/Category