编程介的小学生 2019-06-29 22:39 采纳率: 20.5%
浏览 127

计算可以添加到特定数字的最小的子字符串,怎么使用C语言的代码的编写的技术的过程的实现的方式

Problem Description
Give you two number a, b. Output the smallest number that can be added to a to contain the number b as a substring.

Input
The first line contains a single positive integer T( T <= 500 ), indicates the number of test cases.
For each test case: Two number a,b;
0 <= a <= 10^100, 0 <= b <= 10^7

Output
For each test case: output the case number as shown and the smallest number that satisfy the description.

Sample Input
2
9 1
9 2

Sample Output
Case #1: 1
Case #2: 3

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 腾讯企业邮箱邮件可以恢复么
    • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
    • ¥15 错误 LNK2001 无法解析的外部符号
    • ¥50 安装pyaudiokits失败
    • ¥15 计组这些题应该咋做呀
    • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
    • ¥15 让node服务器有自动加载文件的功能
    • ¥15 jmeter脚本回放有的是对的有的是错的
    • ¥15 r语言蛋白组学相关问题
    • ¥15 Python时间序列如何拟合疏系数模型