Submission #26180474
Source Code Expand
def kToTen(sNum, k):
result = 0
for i in range(len(sNum)):
result += int(sNum[i]) * (k ** (len(sNum) - i - 1))
return result
K = int(input())
A, B = input().split()
ans = kToTen(A, K) * kToTen(B, K)
print(ans)
Submission Info
| Submission Time | |
|---|---|
| Task | B - Base K |
| User | Tommy3 |
| Language | Python (3.8.2) |
| Score | 200 |
| Code Size | 231 Byte |
| Status | AC |
| Exec Time | 24 ms |
| Memory | 9096 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 | 8940 KiB |
| 001.txt | AC | 21 ms | 9096 KiB |
| 002.txt | AC | 19 ms | 9048 KiB |
| 003.txt | AC | 18 ms | 9056 KiB |
| 004.txt | AC | 17 ms | 8984 KiB |
| 005.txt | AC | 24 ms | 8848 KiB |
| 006.txt | AC | 18 ms | 8980 KiB |
| 007.txt | AC | 18 ms | 8852 KiB |
| example0.txt | AC | 20 ms | 8980 KiB |
| example1.txt | AC | 21 ms | 8980 KiB |