QOJ.ac

QOJ

実行時間制限: 2 s メモリ制限: 512 MB 満点: 100 難易度: [表示]

#1875. ไม่

統計

กำหนด $k$ และ $n$ จงหาจำนวนเต็มบวก $x$ ที่น้อยที่สุดเป็นลำดับที่ $n$ ซึ่งการเขียน $x\cdot\underbrace{999\ldots9}_{k}$ ในฐานสิบไม่มีเลขโดด $9$ เลย

ข้อมูลนำเข้า

บรรทัดเดียวมีจำนวนเต็มสองจำนวน $k$ และ $n$ ($1\le k\le18$, $1\le n\le10^{18}$)

ข้อมูลส่งออก

แสดงคำตอบ

ตัวอย่าง

ข้อมูลนำเข้า 1

1 1

ข้อมูลส่งออก 1

2

ข้อมูลนำเข้า 2

1 8

ข้อมูลส่งออก 2

9

ข้อมูลนำเข้า 3

1 9

ข้อมูลส่งออก 3

12

ข้อมูลนำเข้า 4

1 10

ข้อมูลส่งออก 4

13

ข้อมูลนำเข้า 5

5 1

ข้อมูลส่งออก 5

11112

ข้อมูลนำเข้า 6

5 84

ข้อมูลส่งออก 6

11235

ข้อมูลนำเข้า 7

5 668

ข้อมูลส่งออก 7

12345

ข้อมูลนำเข้า 8

5 733942

ข้อมูลส่งออก 8

2281488

หมายเหตุ

เมื่อ $k=1$ ลำดับของจำนวนทั้งหมดที่ตรงตามเงื่อนไขเริ่มต้นด้วย $2,3,4,5,6,7,8,9,12,13,\ldots$

Editorials

IDTypeStatusTitlePosted ByLast UpdatedActions
#548Editorial Open集训队作业 解题报告 by 朱鹏睿Qingyu Download

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.