acmore 1510: ZZ love Cookies

1510: ZZ love Cookies

Time Limit: 1 Sec   Memory Limit: 64 MB
Submit: 228   Solved: 139
Submit
Status
Web Board

Description

  One day, ZZ came to visit her friend LL and DD and saw that they have many cookies. The cookies are distributed into bags, As there are many cookies, ZZ decided that it’s no big deal if she steals a bag. However, she doesn’t want to her friends to quarrel because of nothing when they divide the cookies. That’s why ZZ wants to steal a bag with cookies so that the number of cookies in the remaining bags was even, that is, so that LL and DD could evenly divide into two (even 0 remaining cookies will do, just as any other even number). How many ways there are to steal exactly one cookies bag so that the total number of cookies in the remaining bags was even?

Input

The first line contains the only integer n (1

分享至
一键收藏,随时查看,分享好友!
0人
了这篇文章
类别:未分类┆阅读( 0)┆评论( 0) ┆ 返回博主首页┆ 返回博客首页
上一篇 C++ STL 下一篇 acmore 1503: ZZ买衣服

你可能感兴趣的:(C++,c)