結果

問題 No.499 7進数変換
ユーザー Mcpu3
提出日時 2018-08-28 20:54:56
言語 Java
(openjdk 23)
結果
AC  
実行時間 121 ms / 1,000 ms
コード長 292 bytes
コンパイル時間 2,679 ms
コンパイル使用メモリ 74,024 KB
実行使用メモリ 41,728 KB
最終ジャッジ日時 2024-07-18 05:00:12
合計ジャッジ時間 6,119 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt(),a[]=new int[11],t=0,i;
		sc.close();
		do {
			a[t]=n%7;
			t++;
			n/=7;
		}while(n>0) ;
		for(i=t;i>0;i--) System.out.print(a[i-1]);
	}
}
0