codeforces 719A 【python】
来源:互联网 发布:mysql-5.5.57安装 编辑:程序博客网 时间:2024/05/17 02:17
因为list里的数字都是连续的,所以题目并不难,但要特殊判断结尾的15和0
n = int(raw_input())themoon = map(int,raw_input().split())if len(themoon) == 1: if themoon[0] == 15: print "DOWN" elif themoon[0] == 0: print "UP" else: print -1else: a = themoon[-1] b = themoon[-2] if a - b > 0: if a == 15 and b == 14: print "DOWN" else: print "UP" elif a - b < 0: if a == 0 and b == 1: print "UP" else: print "DOWN"
阅读全文
0 0
- codeforces 719A 【python】
- codeforces 570A【python】
- codeforces 731A【python】
- codeforces 151A【python】
- codeforces 560A【python】
- codeforces 651A python
- Review of Codeforces 5A and 5B(Python)
- Review of codeforces 484A Bits based on python
- CodeForces-a
- Codeforces 903A A
- Codeforces 719A-Vitya in the Countryside
- CodeForces 719 A. Vitya in the Countryside
- Codeforces-719A-Vitya in the Countryside
- CodeForces 719A. Vitya in the Countryside
- codeforces 719A Vitya in the Countryside
- Codeforces 719A A. Vitya in the Countryside
- CodeForces 18A A - Triangle
- CodeForces 133A A. HQ9+
- CorelDRAW 折扇效果实例教程学会了就顶学几年了
- 3个简单的c程序
- 自定义对象与bool之间的转换
- angularjs速成学习个人理解_7指令Directives
- Android开发之Path详解
- codeforces 719A 【python】
- python t分布的双侧置信区间
- Gym 100825 H
- java程序制作ASCII编码表
- oracle之内连接与外链接
- 利用SD卡实现嵌入式Linux系统的自动升级
- 自作的一个Prison Break 界面
- 对C中操作符的认知
- 常用linux命令