【Hacker Rank】07.Write a function
来源:互联网 发布:tt语音软件 编辑:程序博客网 时间:2024/06/03 14:47
Code:
# -*- coding:UTF-8 -*-def is_leap(year): while 1900 <= year <= 10 ** 5: if (year % 4 == 0 and year % 100 != 0) or (year % 100 == 0 and year % 400 == 0): print True else: print False breakif __name__ == "__main__": y = int(raw_input()) is_leap(y)
0 0
- 【Hacker Rank】07.Write a function
- 【Hacker Rank】08.Print function
- 【Hacker Rank】06.Loops
- 【Hacker Rank】04.Arithmetic Operators
- 【Hacker Rank】05.Python: Division
- 【Hacker Rank】02.Reading Raw Input
- 【Hacker Rank】03.Python If-Else
- Hacker Rank: Gridland Metro解题报告
- Write a function that computes log2() using sqrt()
- Interview Q&A - Write a C# console application to implement a string replacement function
- JavaScript:to write a function which increments a string, to create a new string
- Write a function to find the depth of a binary tree
- Write a function to find the depth of a binary tree
- CareerCup Write a function that given a position returns the digit in that 0123456789101112131415..
- Given an integer, write a function to determine if it is a power of two.
- Given an integer, write a function to determine if it is a power of two
- Write a function that takes a string as input and returns the string reversed.
- Given a function RAND5 that generates random numbers in the range 0 to 5 write a function RAND7?
- android studio导入第三方类库的方法
- Android监听屏幕屏幕锁屏与解锁
- Android"挂逼"修炼之行---微信实现本地视频发布到朋友圈功能
- 最近用到的一些技术
- php编程效率的20个要点
- 【Hacker Rank】07.Write a function
- 单机游戏计时器防作弊解决方案
- 那些看似隐秘却能令Excel事半功倍的小技巧,你都知道吗?
- Java实现ping功能的三种方法
- Intel和Motorola数据格式
- openni+nite体感鼠标模拟
- nodejs群聊和私聊
- html2--列表的标记
- Genymotion模拟器运行白屏