Submission #31658425
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)
std::vector<std::string> split(const std::string& text, const char delim);
using ll = long long int;
using llu = unsigned long long int;
int main(){
string buffer;
getline(cin, buffer);
string result;
if(buffer.length() == 1){
result = string(6, buffer.front());
}else if(buffer.length() == 2){
result = buffer + buffer + buffer;
}else if(buffer.length() == 3){
result = buffer + buffer;
}
cout << result << endl;
return 0;
}
std::vector<std::string> split(const std::string& text, const char delim){
std::vector<std::string> item_list;
std::stringstream ss(text);
std::string buffer;
const size_t NUM_ITEM = std::count(text.begin(), text.end(), delim);
item_list.reserve(NUM_ITEM + 1);
while ( std::getline(ss, buffer, delim) ) {
if (!buffer.empty()) {
item_list.emplace_back(buffer);
}
}
return item_list;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Six Characters |
| User | low10603 |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 1078 Byte |
| Status | AC |
| Exec Time | 8 ms |
| Memory | 3616 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| 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, 008.txt, 009.txt, 010.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 8 ms | 3528 KiB |
| 001.txt | AC | 2 ms | 3584 KiB |
| 002.txt | AC | 2 ms | 3524 KiB |
| 003.txt | AC | 2 ms | 3544 KiB |
| 004.txt | AC | 2 ms | 3584 KiB |
| 005.txt | AC | 3 ms | 3568 KiB |
| 006.txt | AC | 2 ms | 3408 KiB |
| 007.txt | AC | 2 ms | 3468 KiB |
| 008.txt | AC | 2 ms | 3472 KiB |
| 009.txt | AC | 3 ms | 3592 KiB |
| 010.txt | AC | 5 ms | 3412 KiB |
| example0.txt | AC | 2 ms | 3404 KiB |
| example1.txt | AC | 2 ms | 3616 KiB |