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