結果

問題 No.964 2020
ユーザー suppy193
提出日時 2021-05-02 11:43:52
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,020 ms
コード長 233 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 20,352 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-20 20:14:33
合計ジャッジ時間 878 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 % 10);
			}
		}
	}
	printf("\n");

	return 0;
}
0