8.621 - Secret Research
2019独角兽企业重金招聘Python工程师标准>>>
这道题只有打印 ‘+’ 时是仅仅有1、4、78三种情况的。
‘-’:最后两个数字为‘3’,‘5’的都满足; 比如,14781903519035
'*':第一个为数字'9',最后一个为数字'4'的都满足; 比如,9359419014784
'?':前三个数字为'1','9','0'的都满足. 比如19014783594
前期以为只有12种情况,直接枚举打印得了一个WA。
int main()
{
int n;
for(scanf("%d",&n); n--;)
{
char str[256];
scanf("%s",str);
if(strcmp(str,"1")==0||strcmp(str,"4")==0||strcmp(str,"78")==0) putchar('+');
else
{
int len=strlen(str)-1;
if(str[len-1]=='3'&&str[len]=='5') putchar('-');
else if(str[0]=='9'&&str[len]=='4') putchar('*');
else putchar('?');
}
putchar('\n');
}
return 0;
}
转载于:https://my.oschina.net/pandacub/blog/139193
8.621 - Secret Research相关推荐
- UVA 621 Secret Research
额.. 不理解这题为什么会是数学题 0.0 可能是输入中有很长的字符串需要处理,然后获得字符串的位数是一个需要技巧的过程? 不过我直接STL过的 ...真心感觉STL很方便 但是也不能依赖STL额.. ...
- UVA621 Secret Research【水题】
At a certain laboratory results of secret research are thoroughly encrypted. A result of a single ex ...
- 提取了下刘汝佳推荐的题号...
今天闲来没事上uva oj提取了下刘汝佳推荐的acm题号,原始数据如下: Volume 0. Getting Started 10055 - Hashmat the Brave Warrior ...
- Competitive Programming 3题解
题目一览: Competitive Programming 3: The New Lower Bound of Programming Contests(1) Competitive Programm ...
- AOAPC I: Beginning Algorithm Contests 题解
AOAPC I: Beginning Algorithm Contests 题解 AOAPC I: Beginning Algorithm Contests (Rujia Liu) - Virtual ...
- how to do research
首先,我不是Ph.D,但也在做一些研究工作.觉得这篇文章讲的很不错,就贴出来,间或有点自己的理解. How to do research? And Related Issues of Ph.D Edu ...
- The Cook and the Chef: Musk’s Secret Sauce
source: http://waitbutwhy.com/2015/11/the-cook-and-the-chef-musks-secret-sauce.html The Cook and the ...
- 流利阅读12.19 Victoria’s Secret gets ready for a makeover
下载pdf资料: GitHub - zhbink/LiuLiYueDu: 流利阅读pdf汇总 流利阅读对每期内容均有很好的文章讲解,向您推荐. 您可以关注微信公众号:流利阅读 了解详情. Victor ...
- The top 100 papers Nature explores the most-cited research of all time.
The top 100 papers Nature explores the most-cited research of all time. The discovery of high-temper ...
- Goblintown.wtf project research report
typora-copy-images-to: upload Goblintown.wtf project research report Yu DAO Researcher:@Deanchan62 ...
最新文章
- mysql中imagin的类型_Image转换成Mysql的blob类型 | 学步园
- android 检查网络连接状态实现步骤
- poj3254 Corn Fields 状压DP入门
- C++binary exponent二元指数算法的实现(附完整源码)
- hdu_1728_逃离迷宫(bfs)
- 继续泼冷水 Ubuntu决定放弃支持安腾
- 如何部署 Hyperic ,使得从内网监测外网服务器
- java并发编程-基础
- Ripple(Glance)
- TensorFlow by Google 实战CNN Machine Learning Foundations: Ep #4 - Coding with CNN
- ir2104s的自举电容_有关IR2104的自举电容和NMOS选择问题教程.docx
- android 陀螺仪滤波_高精度MEMS陀螺仪的滤波算法研究
- 苹果电脑快速重装Windows系统
- Lenovo家用台式与一体机预装Win8改装Win7的解决方案
- tabIndex的用途
- 2017计算机非全日制调剂,2017年非全日制硕士研究生调剂方案
- 通过MCU实现Altera FPGA在线升级
- Linux journal日志文件维护
- 趣味闹钟,社区化讨论
- C++:如何使用C++读取npy文件
热门文章
- Rust : RUST_BACKTRACE=1错误提示
- Python: 日志库logging总结
- (转) 数字加密货币全球资源汇总
- Rust : codewars的Sum of Pairs
- (转)三年后,我手里的比特币值多少钱
- (转)金融从业者将被人工智能取代?
- 技术人 | 是架构师,也是工作中的“厨师”
- 阿里云王伟民:数据库的策略与思考
- 易建科技eKing Cloud招聘,快到碗里来~
- php输出单行,file - php如何随机输出文件内一行?