Submission #26137426
Source Code Expand
def trans(x, k):
d = 0
ret = 0
while x > 0:
mod = x % 10
ret += mod * k ** d
d += 1
x //= 10
return ret
k = int(input())
a, b = map(int, input().split())
print(trans(a, k) * trans(b, k))
Submission Info
| Submission Time | |
|---|---|
| Task | B - Base K |
| User | cubesat |
| Language | Python (3.8.2) |
| Score | 200 |
| Code Size | 249 Byte |
| Status | AC |
| Exec Time | 25 ms |
| Memory | 9112 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 19 ms | 9028 KiB |
| 001.txt | AC | 19 ms | 9028 KiB |
| 002.txt | AC | 20 ms | 8972 KiB |
| 003.txt | AC | 17 ms | 8876 KiB |
| 004.txt | AC | 23 ms | 9032 KiB |
| 005.txt | AC | 19 ms | 8884 KiB |
| 006.txt | AC | 18 ms | 9032 KiB |
| 007.txt | AC | 25 ms | 9036 KiB |
| example0.txt | AC | 21 ms | 9112 KiB |
| example1.txt | AC | 21 ms | 8884 KiB |