結果

問題 No.646 逆ピラミッド
ユーザー extelo
提出日時 2018-02-12 17:59:08
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 559 ms
コンパイル使用メモリ 65,428 KB
最終ジャッジ日時 2025-01-05 08:22:38
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |   scanf("%d", &num);
      |   ~~~~~^~~~~~~~~~~~

ソースコード

diff #

#include <iostream>

int main(void)
{
  int num;
  scanf("%d", &num);
  for(int i = num; i>0; i--) {
    for(int j = i; j>0; j--){
      printf("%d", num);
    }
    printf("\n");
  }

  return 0;
}
0