{"problem":{"name":"Digit Sum Minimization","description":{"content":"Given are positive integers $a, b$, where none of the digits is $0$. Permute the digits of each of $a$ and $b$ so that the sum of the digits in $a+b$ is minimized.","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc130_c"},"statements":[{"statement_type":"Markdown","content":"Given are positive integers $a, b$, where none of the digits is $0$.\nPermute the digits of each of $a$ and $b$ so that the sum of the digits in $a+b$ is minimized.\n\n## Constraints\n\n*   $1\\leq a, b< 10^{100000}$\n*   None of the digits of $a$ and $b$ is $0$.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$a$\n$b$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc130_c","tags":[],"sample_group":[["253\n286","532\n268\n\nWe have $532 + 268 = 800$, whole digits sum to $8+0+0=8$.\nOther solutions will also be accepted, such as $(a, b) = (325, 682)$."],["345\n556","435\n565\n\nWe have $435+565=1000$, whole digits sum to $1+0+0+0=1$."],["123\n987987","312\n799788\n\nWe have $312 + 799788 = 800100$, whole digits sum to $8+0+0+1+0+0=9$."],["11111111111111111111\n111111111111111111111111111111","11111111111111111111\n111111111111111111111111111111"]],"created_at":"2026-03-03 11:01:13"}}