# Fuking silly, OTZ....

 import sys

 def main():
n = int(raw_input()) for num in sys.stdin:
if int(num) % 2 == 0:
print int(num)
else: # 千万不要忘了考虑奇数的情况
print int(num) -1 main()

学习

  化繁为简

    逻辑上的理解正确和化繁为简,是刷OJ的第一步,比如本题,一堆废话,其实水爆

  输入缓冲流

    stdin这种输入就是缓冲流的使用

  判断奇偶

    模2

错误

  奇数

    注意题目中的数据input,明显是包含奇数的

Double Strings Solved Problem code: DOUBLE的更多相关文章

  1. Factorial Solved Problem code: FCTRL

    import sys #import psyco #很奇怪,这题用psyco就runtime error #psyco.full() def z(n): #这个应该是技巧的一种算法 r = 0 whi ...

  2. ATM Solved Problem code: HS08TES

    # ATM import sys withdraw, balance = map(float, sys.stdin.readline().strip().split()) # strip()用法去除结 ...

  3. Small factorials Solved Problem code: FCTRL2

    import sys def fact(n): final = n while n > 1: final *= n - 1 n -= 1 return final #逻辑严谨,不要忘了retur ...

  4. Enormous Input Test Solved Problem code: INTEST

    import sys import psyco #一键优化库 psyco.full() def main(): n, k = map(int, sys.stdin.readline().strip() ...

  5. [转]Passing Managed Structures With Strings To Unmanaged Code Part 3

    1. Introduction. 1.1 In part 1 of this series of blogs we studied how to pass a managed structure (w ...

  6. [转]Passing Managed Structures With Strings To Unmanaged Code Part 2

    1. Introduction. 1.1 In part 1 of this series of blogs we studied how to pass a managed structure (w ...

  7. Cooking Schedule Problem Code: SCHEDULE(优先队列)

    Cooking Schedule Problem Code: SCHEDULE Chef is a well-known chef, and everyone wishes to taste his ...

  8. Gym 101194E / UVALive 7901 - Ice Cream Tower - [数学+long double][2016 EC-Final Problem E]

    题目链接: http://codeforces.com/gym/101194/attachments https://icpcarchive.ecs.baylor.edu/index.php?opti ...

  9. CSU 1506 Problem D: Double Shortest Paths(最小费用最大流)

    题意:2个人从1走到n,假设一条路第一次走则是价值di,假设第二次还走这条路则须要价值di+ai,要你输出2个人到达终点的最小价值! 太水了!一条边建2次就OK了.第一次价值为di,第二次为ai+di ...

随机推荐

  1. Python -- 大小写转换

    #小写转大写 strs = 'abcd' strs = strs.upper() print u'abcd小写转大写:', strs #大写转小写 strs = 'ABCD' strs = strs. ...

  2. linux下安装eclipse

    最开始的版本OpenSuse + jre-7u25-linux-i586.tar.gz + eclipse-cpp-kepler-R-linux-gtk.tar.gz 配置好java环境后启动ecli ...

  3. iOS 9的 Universal Links 通用链接使用

    前段时间和朋友(@品味生活)一起搞 iOS9的通用链接,我主要做了前面官方文档翻译工作,后面的一些东西都是他在搞,整理也是他整理的. 他的博客原文地址:http://pinwei.blog.51cto ...

  4. hdu 找新朋友

    #include <cstdio> #include <cstring> #include <algorithm> using namespace std; ]; ...

  5. PowerShell正则表达式(一) 定义模式

    PowerShell正则表达式(一) 定义模式 7 29 9月, 2013  在 Powershell tagged 正则表达式 by Mooser Lee 本文索引 [隐藏] 1限定符 2识别IP地 ...

  6. 【Xamarin开发IOS-IOS生命周期】

    iOS的应用程序的生命周期,还有程序是运行在前台还是后台,应用程序各个状态的变换,这些对于开发者来说都是很重要的. iOS系统的资源是有限的,应用程序在前台和在后台的状态是不一样的.在后台时,程序会受 ...

  7. delphi中通过http控件上载文件的问题(紧急) 整理的CSDN 帖子

    http控件能不能实现post文件?要求效果就像普通的html中通过表单(form中<INPUT TYPE="FILE" NAME="FILE1" SIZ ...

  8. 【开源】Hawk-数据抓取工具:简明教程

    1.软件介绍 HAWK是一种数据采集和清洗工具,依据GPL协议开源,能够灵活,有效地采集来自网页,数据库,文件, 并通过可视化地拖拽, 快速地进行生成,过滤,转换等操作.其功能最适合的领域,是爬虫和数 ...

  9. puppet证书重申

  10. Entify Framewrok - 学习链接

    http://blogs.msdn.com/b/adonet/archive/2011/01/31/using-dbcontext-in-ef-feature-ctp5-part-6-loading- ...