您当前的位置: 首页 > 

MangataTS

暂无认证

  • 6浏览

    0关注

    423博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

AtCoder Beginner Contest 182C

MangataTS 发布时间:2020-11-09 20:39:00 ,浏览量:6

C - To 3

Time Limit: 2 sec / Memory Limit: 1024 MB

Score : 300300 points

Problem Statement

Given is a positive integer N, where none of the digits is 0.Let k be the number of digits in N. We want to make a multiple of 3 by erasing at least 0 and at most k−1 digits from N and concatenating the remaining digits without changing the order.Determine whether it is possible to make a multiple of 3 in this way. If it is possible, find the minimum number of digits that must be erased to make such a number.

Constraints

  • 1≤N>ch; dfs(ch,0); if(cnt == 0)//如果全都删了 std::cout
关注
打赏
1665836431
查看更多评论
立即登录/注册

微信扫码登录

0.0368s