Codeforces Round #348 (div 2) A. Little Artem and Presents
2017-11-13 21:06
399 查看
题意:
给一个送礼,一共n个礼物,一次送的数量随意,但是相邻两次不能相同,问最多送几次思路:
错误及反思:
代码:
#include<bits/stdc++.h> using namespace std; int main() { long long n; scanf("%I64d",&n); long long ans=(n/3)*2; if(n%3) ans++; printf("%I64d\n",ans); }
相关文章推荐
- Codeforces Round #348 (VK Cup 2016 Round 2, Div. 2 Edition) A. Little Artem and Presents 水题
- Codeforces Round #348 (VK Cup 2016 Round 2, Div. 2 Edition)-A. Little Artem and Presents(模拟)
- [2-SAT] Codeforces 668E #348 (VK Cup 2016 Round 2, Div. 1 Edition) E. Little Artem and 2-SAT
- Codeforces Round #348 (VK Cup 2016 Round 2, Div. 2 Edition)-B. Little Artem and Grasshopper(模拟)
- 【codeforce】-#669A-Little Artem and Presents(数学,找规律)
- 13周练J - Little Artem and Presents【规律】
- 【CodeForces】[669A]Little Artem and Presents
- Codeforces Round #348 (VK Cup 2016 Round 2, Div. 2 Edition) C. Little Artem and Matrix 模拟
- Codeforces 669A Little Artem and Presents(数量不同送礼物)
- Codeforces Round #348 (div 2) B - Little Artem and Grasshopper
- CodeForces 669A Little Artem and Presents
- Codeforces Round #348 (div 2) C. Little Artem and Matrix
- Codeforces Round #348 (VK Cup 2016 Round 2, Div. 1 Edition) C. Little Artem and Random Variable 数学
- Codeforces Round #348 (div 2) D - Little Artem and Dance
- CF Round #348 Div. 2 A. Little Artem and Present B. Little Artem and Grasshopper C. Little Artem and
- Codeforces Round #348 (VK Cup 2016 Round 2, Div. 2 Edition) D. Little Artem and Dance 模拟
- ACM刷题之Codeforces————Little Artem and Presents
- Codeforces Round #348 (VK Cup 2016 Round 2, Div. 2 Edition) E. Little Artem and Time Machine 树状数组
- CodeForces 669A Little Artem and Presents
- Codeforces Round #348 (VK Cup 2016 Round 2, Div. 2 Edition) D. Little Artem and Dance