水题,简单。

 1 #include<iostream>
 2 #include<cstring>
 3
 4 using namespace std;
 5
 6 int main()
 7 {
 8     int n;
 9     char str[10000];
10     cin >> n;
11     while(n--)
12     {
13         cin >> str;
14         if (!strcmp(str, "1") || !strcmp(str, "4") || !strcmp(str, "78"))
15             cout << "+" << endl;
16         else if (str[strlen(str)-1] == '5' && str[strlen(str)-2] == '3')
17             cout << "-" << endl;
18         else if (str[0] == '9' && str[strlen(str)-1] == '4')
19             cout << "*" << endl;
20         else if (str[0] == '1' && str[1] == '9' && str[2] == '0')
21             cout << "?" << endl;
22     }
23     return 0;
24 }

转载于:https://www.cnblogs.com/zrq495/archive/2012/07/24/2607029.html

UVa 621 - Secret Research相关推荐

  1. UVA 621 Secret Research

    额.. 不理解这题为什么会是数学题 0.0 可能是输入中有很长的字符串需要处理,然后获得字符串的位数是一个需要技巧的过程? 不过我直接STL过的 ...真心感觉STL很方便 但是也不能依赖STL额.. ...

  2. UVA621 Secret Research【水题】

    At a certain laboratory results of secret research are thoroughly encrypted. A result of a single ex ...

  3. 提取了下刘汝佳推荐的题号...

    今天闲来没事上uva oj提取了下刘汝佳推荐的acm题号,原始数据如下: Volume 0. Getting Started    10055 - Hashmat the Brave Warrior ...

  4. UVa12467 Secret Word(kmp)

    先将s反转得到字符串t,再通过kmp求得t的子串,使得访子串是s的最长前缀 代码参考: OJ/UVa/12467 Secret Word at master · wuli2496/OJ · GitHu ...

  5. Competitive Programming 3题解

    题目一览: Competitive Programming 3: The New Lower Bound of Programming Contests(1) Competitive Programm ...

  6. AOAPC I: Beginning Algorithm Contests 题解

    AOAPC I: Beginning Algorithm Contests 题解 AOAPC I: Beginning Algorithm Contests (Rujia Liu) - Virtual ...

  7. 紫书《算法竞赛入门经典》

    紫书<算法竞赛入门经典>题目一览 第3章 数组和字符串(例题) UVA 272 TEX Quotes UVA 10082 WERTYU UVA 401 Palindromes UVA 34 ...

  8. 初学者acm的练习题指南

    上机练习题参考题 忘了在哪找的啦~~希望对大家有帮助呦 <!--[if !supportLists]-->1.    <!--[endif]-->Programming Bas ...

  9. Prefix function. Knuth–Morris–Pratt algorithm

    Prefix function. Knuth–Morris–Pratt algorithm Prefix function definition You are given a string \(s\ ...

  10. 【例题 6-21 UVA - 506】System Dependencies

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 记录每个物品它的依赖有哪些,以及它被哪些东西依赖就可以了. 显式安装的东西不能被隐式删除删掉(就是remove item,然后删除i ...

最新文章

  1. HP 服务器使用 SmartStart CD 引导安装 windows 2008 操作系统
  2. 剑指 Offer 34. 二叉树中和为某一值的路径【附完整可运行代码】
  3. 整理几个常用的sql和其他代码
  4. 第三方支付将出新规 严防信用卡套现
  5. 深入Redis客户端(redis客户端属性、redis缓冲区、关闭redis客户端)
  6. tomcat集群共享session
  7. NVIDIA英伟达:深度学习服务器搭建指南 | 交流会笔记
  8. 邀请您加入移动开发专家联盟
  9. 使用SqlBulkCopy类实现导入excel表格
  10. HDFS原理简图汇总
  11. 有关计算机科学的问卷调查,E问卷:社会调查问卷新形式
  12. vax关于js方面的一些设置
  13. IT软件资产管理流程梳理介绍
  14. Android Studio 清理缓存clean project与invalidate caches
  15. 基础 | 管理视图、序列、同义词
  16. 【超详细】QQ空间说说爬取教程(看看你的女神在想什么~
  17. Gene Pattern
  18. 计算机学院表演,计算机学院在校三八服装展演活动中荣获最佳表演奖
  19. Stars in Your Window 【POJ - 2482】【线段树扫描线】
  20. Baumer工业相机堡盟相机如何使用Binning像素合并功能( Binning像素合并功能的优点和行业应用)(C++)(C#)

热门文章

  1. SVN增加文件后,文件无法自动包括在项目中的原因
  2. JS中的数组排序函数sort()
  3. 400多个开源项目以及43个优秀的Swift开源项目-Swift编程语言资料大合集
  4. 专线维护 07/11
  5. 做.NET开发解决Extjs4智能感知
  6. net_sf_interfacecpp项目诞生宣言
  7. iOS duplicate symbols for architecture x86_64 问题全面解析
  8. 分布式服务防雪崩熔断器(Hystrix),实现服务降级
  9. yii2.0 读取user表新增字段问题
  10. python time