CF887A.Div. 64

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Top-model Izabella participates in the competition. She wants to impress judges and show her mathematical skills.

Her problem is following: for given string, consisting of only 0 and 1, tell if it's possible to remove some digits in such a way, that remaining number is a representation of some positive integer, divisible by 64, in the binary numerical system.

顶级模特伊莎贝拉参加了比赛。她想给评委留下深刻印象,展现自己的数学能力。

她的题目如下:给定一个仅由 0 和 1 组成的字符串,请判断是否可以删除其中某些数字,使得剩余数字构成的二进制数(表示某个正整数)能被 6464 整除。

输入格式

In the only line given a non-empty binary string s with length up to 100.

在唯一的一行中,给出一个长度不超过 100 的非空二进制字符串 ss。

输出格式

Print «yes» (without quotes) if it's possible to remove digits required way and «no» otherwise.

如果可以按要求移除数字,则输出 «yes»(不带引号);否则输出 «no»。

输入输出样例

  • 输入#1

    100010001

    输出#1

    yes
  • 输入#2

    100

    输出#2

    no

说明/提示

In the first test case, you can get string 1 000 000 after removing two ones which is a representation of number 64 in the binary numerical system.

You can read more about binary numeral system representation here: https://en.wikipedia.org/wiki/Binary_system

在第一个测试用例中,你可以通过删除两个 1 得到字符串 1000000,该字符串是数字 64 在二进制数制下的表示。

你可在此处了解更多关于二进制数制表示的信息:https://en.wikipedia.org/wiki/Binary_system

输入解题思路,AI测评打分。不知道怎么写?

首页