結果

問題 No.499 7進数変換
ユーザー Haijinn
提出日時 2017-04-09 21:52:04
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 128 ms
コンパイル使用メモリ 20,608 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 01:38:55
合計ジャッジ時間 1,133 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27 WA * 1 RE * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         scanf("%d",&n);
      |         ^~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void)
{
	int n;
	int k;
	int z;
	int p[9];
	int i=0;
	scanf("%d",&n);
	while(n!=0){
		p[i]=n%7;
		n/=7;
		
		
		
		i++;
		
	}
	k=i;
	for(i=k-1;i>=0;i--){
		
		
		printf("%d",p[i]);
		
		
		
		
	}
	return 0;
}
0