結果

問題 No.499 7進数変換
ユーザー akitsu818akitsu818
提出日時 2017-04-07 23:33:56
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 354 bytes
コンパイル時間 1,980 ms
コンパイル使用メモリ 72,704 KB
実行使用メモリ 56,324 KB
最終ジャッジ日時 2023-09-23 02:52:30
合計ジャッジ時間 7,330 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,428 KB
testcase_01 AC 122 ms
55,604 KB
testcase_02 AC 123 ms
56,272 KB
testcase_03 AC 123 ms
56,052 KB
testcase_04 AC 122 ms
55,680 KB
testcase_05 AC 124 ms
55,488 KB
testcase_06 AC 126 ms
55,708 KB
testcase_07 AC 126 ms
55,816 KB
testcase_08 AC 124 ms
55,496 KB
testcase_09 AC 124 ms
55,472 KB
testcase_10 AC 125 ms
55,872 KB
testcase_11 AC 127 ms
55,928 KB
testcase_12 AC 124 ms
54,212 KB
testcase_13 AC 123 ms
56,076 KB
testcase_14 AC 124 ms
55,724 KB
testcase_15 AC 123 ms
55,916 KB
testcase_16 AC 122 ms
56,020 KB
testcase_17 AC 126 ms
56,016 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main{
    public static void main(String args[]){
        Scanner cin = new Scanner(System.in);
        int target = cin.nextInt();
        
        int tmp = target;
        int mod = target%7;
        while(tmp>6){
            tmp = tmp/7;
            System.out.print(tmp);
        }
        System.out.println(mod);
    }
}
0