結果

問題 No.499 7進数変換
ユーザー shinwisteriashinwisteria
提出日時 2017-04-08 10:24:46
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 373 bytes
コンパイル時間 4,948 ms
コンパイル使用メモリ 71,428 KB
実行使用メモリ 56,428 KB
最終ジャッジ日時 2023-09-24 23:15:27
合計ジャッジ時間 9,979 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 125 ms
55,716 KB
testcase_02 AC 124 ms
56,428 KB
testcase_03 AC 121 ms
56,068 KB
testcase_04 AC 122 ms
54,164 KB
testcase_05 AC 122 ms
56,092 KB
testcase_06 AC 123 ms
55,964 KB
testcase_07 AC 126 ms
56,144 KB
testcase_08 AC 125 ms
54,188 KB
testcase_09 AC 125 ms
56,080 KB
testcase_10 AC 124 ms
55,984 KB
testcase_11 AC 124 ms
55,796 KB
testcase_12 AC 126 ms
55,496 KB
testcase_13 AC 123 ms
55,936 KB
testcase_14 AC 123 ms
55,724 KB
testcase_15 AC 122 ms
56,048 KB
testcase_16 AC 122 ms
55,768 KB
testcase_17 AC 128 ms
55,708 KB
testcase_18 AC 127 ms
56,088 KB
testcase_19 AC 125 ms
56,236 KB
testcase_20 AC 124 ms
56,060 KB
testcase_21 AC 125 ms
55,656 KB
testcase_22 AC 122 ms
55,692 KB
testcase_23 AC 127 ms
55,744 KB
testcase_24 AC 125 ms
56,076 KB
testcase_25 AC 121 ms
56,420 KB
testcase_26 AC 123 ms
55,736 KB
testcase_27 AC 124 ms
56,168 KB
testcase_28 AC 122 ms
55,900 KB
testcase_29 AC 125 ms
56,100 KB
testcase_30 AC 126 ms
56,144 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();
		while(N != 0){
			int k = N%7;
			str.insert(0, k);
			N /= 7;
		}
		System.out.println(str);

	}

}
0