結果

問題 No.499 7進数変換
ユーザー GrenacheGrenache
提出日時 2017-04-09 10:57:00
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 644 bytes
コンパイル時間 3,381 ms
コンパイル使用メモリ 72,220 KB
実行使用メモリ 56,320 KB
最終ジャッジ日時 2023-09-25 01:17:11
合計ジャッジ時間 8,851 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 127 ms
56,320 KB
testcase_02 AC 125 ms
55,900 KB
testcase_03 AC 126 ms
55,840 KB
testcase_04 AC 125 ms
55,512 KB
testcase_05 AC 127 ms
55,868 KB
testcase_06 AC 126 ms
55,268 KB
testcase_07 AC 127 ms
53,680 KB
testcase_08 AC 128 ms
55,416 KB
testcase_09 AC 124 ms
55,296 KB
testcase_10 AC 124 ms
55,904 KB
testcase_11 AC 125 ms
55,652 KB
testcase_12 AC 126 ms
55,908 KB
testcase_13 AC 126 ms
56,048 KB
testcase_14 AC 127 ms
56,052 KB
testcase_15 AC 125 ms
55,940 KB
testcase_16 AC 124 ms
55,616 KB
testcase_17 AC 127 ms
56,076 KB
testcase_18 AC 127 ms
55,616 KB
testcase_19 AC 127 ms
55,896 KB
testcase_20 AC 128 ms
55,708 KB
testcase_21 AC 127 ms
55,752 KB
testcase_22 AC 128 ms
56,036 KB
testcase_23 AC 127 ms
55,720 KB
testcase_24 AC 128 ms
55,928 KB
testcase_25 AC 127 ms
55,904 KB
testcase_26 AC 128 ms
55,568 KB
testcase_27 AC 127 ms
56,012 KB
testcase_28 AC 128 ms
55,544 KB
testcase_29 AC 126 ms
55,416 KB
testcase_30 AC 126 ms
54,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder499 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();

		StringBuilder ret = new StringBuilder();
		while (n > 0) {
			ret.append((char)('0' + n % 7));
			n /= 7;
		}

		pr.println(ret.reverse());
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0