結果

問題 No.499 7進数変換
ユーザー shinwisteriashinwisteria
提出日時 2017-04-08 10:26:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 1,000 ms
コード長 410 bytes
コンパイル時間 3,166 ms
コンパイル使用メモリ 73,560 KB
実行使用メモリ 56,652 KB
最終ジャッジ日時 2023-09-24 23:15:55
合計ジャッジ時間 8,623 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,820 KB
testcase_01 AC 118 ms
54,528 KB
testcase_02 AC 120 ms
56,152 KB
testcase_03 AC 118 ms
55,796 KB
testcase_04 AC 119 ms
56,148 KB
testcase_05 AC 119 ms
55,840 KB
testcase_06 AC 121 ms
56,440 KB
testcase_07 AC 118 ms
56,424 KB
testcase_08 AC 120 ms
56,180 KB
testcase_09 AC 119 ms
56,604 KB
testcase_10 AC 121 ms
56,244 KB
testcase_11 AC 122 ms
56,448 KB
testcase_12 AC 121 ms
56,516 KB
testcase_13 AC 120 ms
56,404 KB
testcase_14 AC 120 ms
55,956 KB
testcase_15 AC 120 ms
55,992 KB
testcase_16 AC 120 ms
56,152 KB
testcase_17 AC 120 ms
55,984 KB
testcase_18 AC 120 ms
56,144 KB
testcase_19 AC 121 ms
56,436 KB
testcase_20 AC 119 ms
56,244 KB
testcase_21 AC 120 ms
55,888 KB
testcase_22 AC 120 ms
54,776 KB
testcase_23 AC 121 ms
56,624 KB
testcase_24 AC 116 ms
56,152 KB
testcase_25 AC 119 ms
56,192 KB
testcase_26 AC 118 ms
56,188 KB
testcase_27 AC 119 ms
56,652 KB
testcase_28 AC 118 ms
56,616 KB
testcase_29 AC 119 ms
56,312 KB
testcase_30 AC 119 ms
56,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Sevenshinsu {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		s.close();
		StringBuilder str = new StringBuilder();
		if(N == 0){
			str.append("0");
		}
		while(N != 0){
			int k = N%7;
			str.insert(0, k);
			N /= 7;
		}
		System.out.println(str);

	}

}
0