简单数学题。

 #include <cstdio>
#include <cstring>
#include <cstdlib> int main() {
int t;
int T, b;
int i; #ifndef ONLINE_JUDGE
freopen("data.in", "r", stdin);
#endif scanf("%d", &t);
while (t--) {
scanf("%d %d", &T, &b);
if ( % b) {
printf("Impossible!\n");
} else {
if (T == ) {
for (i=; i>; --i) {
if (i%b == )
break;
}
if (i == ) {
printf("Impossible!\n");
} else {
printf("%d\n", i);
}
} else {
for (i=; i>; --i) {
if (i%b == )
break;
}
while (T-- >= ) {
printf("");
}
printf("%d\n", i);
}
}
} return ;
}

最新文章

  1. springmvc对同名参数处理-我们到底能走多远系列(44)
  2. faster with MyISAM tables than with InnoDB or NDB tables
  3. Heritrix源码分析(四) 各个类说明(转)
  4. js检测对象的类型
  5. OSG中相机参数的更改
  6. 我家用的网络IP地址给定,MAC绑定,我买了个无线路由器,请问怎么设定能让我的电脑和手机都能上网
  7. hadoop 2.3 集群总结
  8. 淘宝的数据库拆分(TDDL)(转)
  9. iPhone应用中加入评分功能
  10. Carthage - 一个简单、去集中化的Cocoa依赖管理器
  11. 可视化Git版本管理工具SourceTree的使用
  12. 个人作业3—个人总结(Alpha阶段)
  13. 给大家安利一个学习angular2的视频网站
  14. [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [E:\soft\studySoft\tomcat\apache-tomcat-8.5.33\webapp
  15. python可变对象和不可变对象的解释
  16. 灾难性遗忘(catastrophic forgetting)
  17. 很清晰的解读i2c协议【转】
  18. FTP和TCP的文件传输效率对比测试分析
  19. 【学习笔记】--- 老男孩学Python,day18 面向对象------继承
  20. UVA-1343 The Rotation Game (IDA*)

热门文章

  1. java 中流的使用
  2. Vagrant 部署python开发环境
  3. Java 编程的动态性,第3部分: 应用反射--转载
  4. Linux查看硬件信息以及驱动设备的命令
  5. 【翻译】A (very) short introduction to R R的简短介绍
  6. JAVA File转Byte[]
  7. 执行CMD命令
  8. android之GridView实现九宫格布局
  9. SQL从入门到基础 - 02 SQLServer的使用
  10. Ubuntu 11.10开启root用户登陆