Find The Multiple













Time Limit: 1000MS   Memory Limit: 10000K
Total Submissions: 16995   Accepted: 6921   Special Judge

Description

Given a positive integer n, write a program to
find out a nonzero multiple m of n whose decimal representation contains only
the digits 0 and 1. You may assume that n is not greater than 200 and there is a
corresponding m containing no more than 100 decimal digits.

Input

The input file may contain multiple test cases.
Each line contains a value of n (1 <= n <= 200). A line containing a zero
terminates the input.

Output

For each value of n in the input print a line
containing the corresponding value of m. The decimal representation of m must
not contain more than 100 digits. If there are multiple solutions for a given
value of n, any one of them is acceptable.

Sample Input

2
6
19
0

Sample Output

10
100100100100100100
111111111111111111

时间: 2024-12-18 18:35:24

Find The Multiple的相关文章

Error: Can&#39;t place multiple pins assigned to pin location……解决办法

转载:http://blog.sina.com.cn/s/blog_6f0eeb3301014pi7.html 今天用DE0做VGA实验,在分配管脚后全编译出现下面这样的错误: Error: Can't place multiple pins assigned to pin location Pin_K22 (IOPAD_X41_Y19_N14) Info: Pin B[0] is assigned to pin location Pin_K22 (IOPAD_X41_Y19_N14) Info

HDOJ 4474 Yet Another Multiple Problem

BFS..... Yet Another Multiple Problem Time Limit: 40000/20000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 3307    Accepted Submission(s): 806 Problem Description There are tons of problems about integer multiple

【Android-tips】 Unable to execute dex: Multiple dex files define 解决方法

唔,之前已经想过今后不动android,没想到还是因为比赛的原因重操旧业.android有很多问题是由于eclipse的不完善造成的,比如今天遇到的这个问题 Unable to execute dex: Multiple dex files define [2011-10-23 16:23:29 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/myapp/R$array; [2011-10-23 16:23:

hdu 1019 Least Common Multiple

Least Common Multiple Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 54584    Accepted Submission(s): 20824 Problem Description The least common multiple (LCM) of a set of positive integers is

rpm卸载包遭遇 specifies multiple packages 错误

使用 rpm删除软件时报错如下: [[email protected]]# rpm -qa |grep -i mysqlmysql-devel-5.0.95-5.el5_9mysql-devel-5.0.95-5.el5_9MySQL-shared-5.5.34-1.rhel5mysql-5.0.95-5.el5_9mysql-server-5.0.95-5.el5_9MySQL-shared-compat-5.5.34-1.rhel5perl-DBD-MySQL-3.0007-2.el5mys

- Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead. 解决方案

<template> <div>{{hello}}</div> <button @click="addOne">add one</button> <button @click="minusOne">minus one</button> </template> 在*.vue组件里有这么一段. 报错信息: (Emitted value instead of an instan

题目1439:Least Common Multiple(求m个正数的最小公倍数lcm)

题目链接:http://ac.jobdu.com/problem.php?pid=1439 详解链接:https://github.com/zpfbuaa/JobduInCPlusPlus 参考代码: // // 1439 Least Common Multiple.cpp // Jobdu // // Created by PengFei_Zheng on 10/04/2017. // Copyright © 2017 PengFei_Zheng. All rights reserved. /

Consolidate data by using multiple page fields

https://support.office.com/en-us/article/Consolidate-multiple-worksheets-into-one-PivotTable-report-3AE257D2-CA94-49FF-A481-E9FC8ADEEEB5 You can create multiple page fields and assign your own item names for each source range. This lets you create pa

[NPM] Use a shorthand syntax for running multiple npm scripts with npm-run-all

Running multiple scripts in series or in parallel can become very verbose. Using a tool such as npm-run-all can help reduce the amount of overhead you have to type in order to get the same behavior. Install: npm i -D npm-run-all "scripts": { &qu

斯坦福机器学习视频笔记 Week2 Linear Regression with Multiple Variables

相比于week1中讨论的单变量的线性回归,多元线性回归更具有一般性,应用范围也更大,更贴近实际. Multiple Features 上面就是接上次的例子,将房价预测问题进行扩充,添加多个特征(features),使问题变成多元线性回归问题. 多元线性回归将通过更多的输入特征,来预测输出.上面有新的Notation(标记)需要掌握. 相比于之前的假设: 我们将多元线性回归的假设修改为: 每一个xi代表一个特征:为了表达方便,令x0=1,可以得到假设的矩阵形式: 其中,x和theta分别表示: 所