codeforces round 26前两题水题
来源:互联网 发布:工资条发放软件 编辑:程序博客网 时间:2024/06/03 13:06
A number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which are between 1 and n, inclusive.
Input contains one integer number n (1 ≤ n ≤ 3000).
Output the amount of almost prime numbers between 1 and n, inclusive.
10
2
21
8
A bracket sequence is called regular if it is possible to obtain correct arithmetic expression by inserting characters "+" and "1" into this sequence. For example, sequences "(())()", "()" and "(()(()))" are regular, while ")(", "(()" and "(()))(" are not.
One day Johnny got bracket sequence. He decided to remove some of the brackets from it in order to obtain a regular bracket sequence. What is the maximum length of a regular bracket sequence which can be obtained?
Input consists of a single line with non-empty string of "(" and ")" characters. Its length does not exceed 106.
Output the maximum possible length of a regular bracket sequence.
(()))(
4
((()())
6
- codeforces round 26前两题水题
- Educational Codeforces Round 26
- Educational Codeforces Round 26
- Educational Codeforces Round 26 D Round Subset
- Educational Codeforces Round 26总结
- Educational Codeforces Round 26 B
- Educational Codeforces Round 26 C
- Educational Codeforces Round 26 D
- Educational Codeforces Round 26 E
- Codeforce_827C_Two Seals_Educational Codeforces Round 26
- 【codeforces】Codeforces Round #363
- cf Educational Codeforces Round 26 D. Round Subset
- Educational Codeforces Round 26 C. Two Seals
- Educational Codeforces Round 26 A—C
- Educational Codeforces Round 26;A. Text Volume
- Educational Codeforces Round 26 ABC题
- Educational Codeforces Round 26 C. Two Seals
- Educational Codeforces Round 26 A. Text Volume
- Linux 2.6 字符设备驱动程序
- Access 关键字
- WinCE中显示隐藏软键盘
- UltraEdit如何自动换行
- WinCE控件圆圈消息
- codeforces round 26前两题水题
- 和大家见个面(51CTO做的视频访谈)
- [android] 将Java程序移植到android上
- 如何使用POI处理Excel中的日期数据类型
- 《新知客》趣题专栏2010.08
- Android Resource介绍和使
- Android UI学习 - Menu
- BeanUtils.copyProperties与PropertyUtils.copyProperties用法及区别
- 人所不欲,勿施于人