結果

問題 No.964 2020
ユーザー suppy193
提出日時 2021-05-02 11:36:31
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 289 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 20,224 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-20 20:07:26
合計ジャッジ時間 1,268 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%d", &n);
      |         ^~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void) {

	int n;
	int i, j;
	scanf("%d", &n);
	
	if(n == 1){
		printf("1\n");
	}
	else{
		for(i = 1;i <= n;i++){
			for(j = 0;j < n;j++){
				printf("%d", i);
			}
		}
	}
	if(n == 10){
		for(i = 0;i < n;i++){
			printf("0");
		}
	}
	printf("\n");

	return 0;
}
0