I'm not going to hang. 2 time limit: +Ms | Memory Limit:65535KB Difficulty:0
-
-
Describe
-
To say seniors who kind, ACM find LY. Yes, I can no longer agree with the above sentence. The question comes: Draw 8.
-
-
Input
-
-
the first behavior of the input is an integer n, which indicates that there are n sets of data behind it.
Each set of data has one character and one integer, the character represents the brush, and the Integer (>=5) represents the height.
-
-
Output
-
-
The horizontal line is always one character thick, and the vertical bar increases by 1 characters justifies with a total height of 6. When the total height increases from 5 to 6 o'clock, the vertical bar width rises from 1 to 2. The lower lap height is not less than the upper lap height, but should be as close as possible to the upper ring height, and the inner diameter of the lower ring is
Each draw a "8" should be empty line, that is, between the two groups have a gorgeous split line
-
-
Sample input
-
-
2 a 7B 8
-
-
Sample output
-
-
AAAA aaaa aa aaaa aaaa AA aa<---Gorgeous split line---> bbbbb BBBB BB bbbbb BBBB BBBB BB BBB
-
Source
Uploaded by
#include <iostream> #include <stdio.h> #include <algorithm> #include <string.h>using namespace Std;char c;int N;int Main () {int t; cin>>t; for (int i=0;i<t;i++) {cin>>c>>n; cout<<c<<endl; int a=n/6+1; int b= (n-3)/2; if ((n-3)%2!=0) b++; cout<<a<< "" <<b<<endl; int j,k; for (j=1;j<=n;j++) {if (j==1| | j==n| | J==n-b-1) {for (k=1;k<=a+b;k++) {if (k<=a) cout<< ""; else cout<<c; }} else {for (k=1;k<=2*a+b;k++) {if (k>a&&k<=a+b) cout<< ""; else cout<<c; } }cout<<endl; } if (i!=t-1) cout<< "<---gorgeous split line--->" <<endl; }}
I don't hang out. 2 Nyoj (Simple Simulation)