-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhuawei_input.cpp
More file actions
34 lines (31 loc) · 793 Bytes
/
huawei_input.cpp
File metadata and controls
34 lines (31 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "sstream"
#include <string>
#include <iostream>
#include <vector>
int main(){
int n;
while(std::cin>>n){
for(int i=0;i<n;++i){
std::string str;
std::cin>>str;
if(str.size()<8){
str.append(8-str.size(),'0');
std::cout<<str<<std::endl;
}else if(str.size()>8){
std::vector<std::string> str_vec;
while(str.size()>8){
str_vec.push_back(str.substr(0,8));
str=str.substr(8);
}
str.append(8-str.size(),'0');
str_vec.push_back(str);
for(const auto s:str_vec){
std::cout<<s<<std::endl;
}
}else{
std::cout<<str<<std::endl;
}
}
}
return 0;
}