B. Unnatural Conditions
題目連結:http://codeforces.com/contest/1028/problem/B
B. Unnatural Conditions
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Let s(x)s(x) be sum of digits in decimal representation of positive integer xx. Given two integers nn and mm, find some positive integers aa and bb such that
- s(a)≥ns(a)≥n,
- s(b)≥ns(b)≥n,
- s(a+b)≤ms(a+b)≤m.
Input
The only line of input contain two integers nn and mm (1≤n,m≤11291≤n,m≤1129).
Output
Print two lines, one for decimal representation of aa and one for decimal representation of bb. Both numbers must not contain leading zeros and must have length no more than 22302230.
Examples
input
Copy
6 5
output
Copy
6 7
input
Copy
8 16
output
Copy
35 53
Note
In the first sample, we have n=6n=6 and m=5m=5. One valid solution is a=6a=6, b=7b=7. Indeed, we have s(a)=6≥ns(a)=6≥n and s(b)=7≥ns(b)=7≥n, and also s(a+b)=s(13)=4≤ms(a+b)=s(13)=4≤m.
#include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
for(int i=0;i<2230;i++){
cout<<5;
}
cout<<endl;
for(int i=0;i<2229;i++){
cout<<4;
}
cout<<5<<endl;
return 0;
}