結果
問題 |
No.646 逆ピラミッド
|
ユーザー |
![]() |
提出日時 | 2018-02-12 17:56:11 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 171 bytes |
コンパイル時間 | 653 ms |
コンパイル使用メモリ | 65,264 KB |
最終ジャッジ日時 | 2025-01-05 08:22:29 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:9: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘int’ [-Wformat=] 6 | scanf("%d\n", num); | ~^ ~~~ | | | | int* int main.cpp:6:6: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d\n", num); | ~~~~~^~~~~~~~~~~~~ main.cpp:6:6: warning: ‘num’ is used uninitialized [-Wuninitialized] 6 | scanf("%d\n", num); | ~~~~~^~~~~~~~~~~~~ main.cpp:5:5: note: ‘num’ was declared here 5 | int num; | ^~~
ソースコード
#include <iostream> int main(void) { int num; scanf("%d\n", num); for(int i = num; i>0; i--) { for(int j = i; j>0; j--){ printf("%d", num); } printf("\n"); } return 0; }