https://pintia.cn/problem-sets/17/problems/260

#include <bits/stdc++.h>

using namespace std;

int main()
{
int N;
char sign;
cin >> N >> sign;
int count = ;
while ( * count * count - <= N)
{
count++;
}
count--; for (int i = ; i < * count - ; i++)
{
for (int j = ; j < count - - abs(count - - i); j++)
{
printf(" ");
}
for (int j = ; j < * abs(count - - i) + ; j++)
{
printf("%c", sign);
}
printf("\n");
}
printf("%d", N - ( * count * count - ));
return ;
}

最新文章

  1. JQ实现判断iPhone、Android设备
  2. Windows下mysql忘记root密码的解决方法
  3. 输出国际象棋&amp;&amp;输出余弦曲线
  4. JavaScript list 去重复
  5. puppet 安装
  6. HDU 4292 Food 最大流
  7. 利用Qt制作一个helloworld
  8. 计算(a/b)%c
  9. KeyValuePair用法(转)
  10. linux实训
  11. cookie报错
  12. APIView源码简单分析图
  13. 消息摘要、哈希(hash)、加盐
  14. 五分钟带你走入MP
  15. 【Java】 剑指offer(56-2) 数组中唯一只出现一次的数字
  16. Mac实现远程服务器登录管理
  17. .Net Entity Framework Core 用 HasColumnType 配置浮点数精度
  18. Reset GitLab Root Password
  19. 《A First Course in Abstract Algebra with Applications》-chaper1-数论-棣莫弗定理
  20. 用Python开始机器学习(3:数据拟合与广义线性回归)

热门文章

  1. 使用PNG实现半透明的窗体(使用GDI+)
  2. QT5.7静态编译(使用VS2013与VS2015编译,XP可用,有详细configure脚本。VS下Qt插件的配置。编译选项加上-mp可以开启多线程编译,编译速度提高2倍以上)
  3. MJPhotoBrowser 用法
  4. 你真的懂printf么?
  5. VS让人纠结的Release和网站一键发布
  6. Verilog写一个对数计算模块Log2(x)
  7. 高并发 Nginx+Lua OpenResty系列(10)——商品详情页
  8. spring cloud 系列第3篇 —— ribbon 客户端负载均衡 (F版本)
  9. vue注意项
  10. CI框架使用(一)