标签:
input | output |
---|---|
2 |
10 |
1 #include <cstdio> 2 #include <cstring> 3 #include <cstdlib> 4 #include <cmath> 5 #include <deque> 6 #include <vector> 7 #include <queue> 8 #include <iostream> 9 #include <algorithm> 10 #include <map> 11 #include <set> 12 #include <ctime> 13 using namespace std; 14 typedef long long LL; 15 typedef double DB; 16 #define For(i, s, t) for(int i = (s); i <= (t); i++) 17 #define Ford(i, s, t) for(int i = (s); i >= (t); i--) 18 #define Rep(i, t) for(int i = (0); i < (t); i++) 19 #define Repn(i, t) for(int i = ((t)-1); i >= (0); i--) 20 #define rep(i, x, t) for(int i = (x); i < (t); i++) 21 #define MIT (2147483647) 22 #define INF (1000000001) 23 #define MLL (1000000000000000001LL) 24 #define sz(x) ((int) (x).size()) 25 #define clr(x, y) memset(x, y, sizeof(x)) 26 #define puf push_front 27 #define pub push_back 28 #define pof pop_front 29 #define pob pop_back 30 #define ft first 31 #define sd second 32 #define mk make_pair 33 inline void SetIO(string Name) { 34 string Input = Name+".in", 35 Output = Name+".out"; 36 freopen(Input.c_str(), "r", stdin), 37 freopen(Output.c_str(), "w", stdout); 38 } 39 40 inline int Getint() { 41 int Ret = 0; 42 char Ch = ‘ ‘; 43 bool Flag = 0; 44 while(!(Ch >= ‘0‘ && Ch <= ‘9‘)) { 45 if(Ch == ‘-‘) Flag ^= 1; 46 Ch = getchar(); 47 } 48 while(Ch >= ‘0‘ && Ch <= ‘9‘) { 49 Ret = Ret*10+Ch-‘0‘; 50 Ch = getchar(); 51 } 52 return Flag ? -Ret : Ret; 53 } 54 55 int n; 56 57 inline void Input() { 58 cin>>n; 59 } 60 61 inline void Solve() { 62 n /= 2; 63 if(n == 1) puts("10"); 64 else { 65 For(i, 1, n-1) printf("1"); 66 printf("0"); 67 For(i, 1, n-2) printf("8"); 68 printf("90"); 69 } 70 } 71 72 int main() { 73 #ifndef ONLINE_JUDGE 74 SetIO("G"); 75 #endif 76 Input(); 77 Solve(); 78 return 0; 79 }
标签:
原文地址:http://www.cnblogs.com/StupidBoy/p/4912381.html