Submission #26158899
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t k, ka, kb;
cin >> k;
cin >> ka >> kb;
int64_t km = 1;
int64_t da = 0;
while ( ka>0 ) {
da += (ka%10)*km;
km *= k;
ka /= 10;
}
km = 1;
int64_t db = 0;
while ( kb>0 ) {
db += (kb%10)*km;
km *= k;
kb /= 10;
}
cout << da*db << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Base K |
| User | RoadLynton27 |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 377 Byte |
| Status | AC |
| Exec Time | 6 ms |
| Memory | 3620 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 | 6 ms | 3524 KiB |
| 001.txt | AC | 2 ms | 3520 KiB |
| 002.txt | AC | 2 ms | 3592 KiB |
| 003.txt | AC | 2 ms | 3620 KiB |
| 004.txt | AC | 2 ms | 3448 KiB |
| 005.txt | AC | 1 ms | 3520 KiB |
| 006.txt | AC | 2 ms | 3440 KiB |
| 007.txt | AC | 2 ms | 3564 KiB |
| example0.txt | AC | 2 ms | 3584 KiB |
| example1.txt | AC | 2 ms | 3408 KiB |