Submission #8618233


Source Code Expand

Copy
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A,B,X = map(int,read().split())

def test(N):
    # かえる
    L = len(str(N))
    return A * N + B * L <= X

left = 0
right = 10 ** 30
while left + 1 < right:
    x = (left + right) // 2
    if test(x):
        left = x
    else:
        right = x
answer = left
if answer > 10 ** 9:
    answer = 10 ** 9
print(answer)

Submission Info

Submission Time
Task C - Buy an Integer
User maspy
Language Python (3.4.3)
Score 300
Code Size 461 Byte
Status AC
Exec Time 17 ms
Memory 3064 KB

Judge Result

Set Name sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 4
AC × 16
Set Name Test Cases
sample sample01, sample02, sample03, sample04
All border01, border02, border03, corner01, max01, max02, max03, min01, min02, rnd01, rnd02, rnd03, sample01, sample02, sample03, sample04
Case Name Status Exec Time Memory
border01 AC 17 ms 3060 KB
border02 AC 17 ms 3064 KB
border03 AC 17 ms 3060 KB
corner01 AC 17 ms 3064 KB
max01 AC 17 ms 3060 KB
max02 AC 17 ms 3060 KB
max03 AC 17 ms 3064 KB
min01 AC 17 ms 3064 KB
min02 AC 17 ms 3064 KB
rnd01 AC 17 ms 3064 KB
rnd02 AC 17 ms 3060 KB
rnd03 AC 17 ms 3064 KB
sample01 AC 17 ms 3064 KB
sample02 AC 17 ms 3064 KB
sample03 AC 17 ms 3064 KB
sample04 AC 17 ms 3060 KB