Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160606 Kevin 输出梯形 C++ Wrong Answer 1 MS 288 KB 421 2026-09-24 19:09:45

Tests(0/1):


Code:

//【备选B方案:单空格版本,用来测试】 #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int h; cin >> h; for(int k = 0; k < h; k++) { string line; line += string(h - 1 - k, ' '); line += string(h + 2*k, '*'); if(k != h-1) line += '\n'; cout << line; } return 0; }


Run Info:

------Input------
1 2 3 4 5 6 7 8 9 10 20 50 100
------Answer-----
* ** **** *** ***** ******* **** ****** ******** ********** ***** ******* ********* *********** ************* ****** ******** ********** ************ ************** **************** ******* ********* *********** ************* *************** ***************** ******************* ******** ********** ************ ************** **********
------Your output-----
*