結果
| 問題 |
No.646 逆ピラミッド
|
| コンテスト | |
| ユーザー |
Breloom
|
| 提出日時 | 2018-02-19 12:55:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 310 bytes |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 24,320 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-07 06:00:13 |
| 合計ジャッジ時間 | 580 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main(int, char**)’:
main.cpp:21:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
21 | scanf("%d",&a);
| ~~~~~^~~~~~~~~
ソースコード
#include <cstdio>
#include <ctime>
#include <cstdlib>
void InversePiramid(int n)
{
int m = n;
for(int j=n; j>0; j--){
for(int i=m; i>0; i--){
printf("%d",n);
}
printf("\n");
--m;
}
}
int main(int argc, char **argv)
{
int a;
scanf("%d",&a);
InversePiramid(a);
return 0;
}
Breloom