結果

問題 No.499 7進数変換
ユーザー fjafjafjafjafjafja
提出日時 2017-08-23 02:02:32
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 2,996 ms
コンパイル使用メモリ 74,492 KB
実行使用メモリ 54,328 KB
最終ジャッジ日時 2024-04-23 04:52:26
合計ジャッジ時間 7,786 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
52,516 KB
testcase_01 AC 116 ms
54,128 KB
testcase_02 AC 105 ms
52,868 KB
testcase_03 AC 113 ms
53,900 KB
testcase_04 AC 105 ms
53,028 KB
testcase_05 AC 106 ms
52,892 KB
testcase_06 AC 115 ms
54,200 KB
testcase_07 AC 118 ms
54,244 KB
testcase_08 AC 106 ms
53,036 KB
testcase_09 AC 119 ms
54,232 KB
testcase_10 AC 109 ms
54,192 KB
testcase_11 AC 114 ms
54,244 KB
testcase_12 AC 103 ms
52,988 KB
testcase_13 AC 111 ms
52,996 KB
testcase_14 AC 128 ms
54,160 KB
testcase_15 AC 129 ms
53,988 KB
testcase_16 AC 116 ms
54,176 KB
testcase_17 AC 117 ms
53,920 KB
testcase_18 AC 120 ms
54,304 KB
testcase_19 AC 119 ms
54,160 KB
testcase_20 AC 106 ms
53,004 KB
testcase_21 AC 107 ms
53,024 KB
testcase_22 AC 119 ms
54,324 KB
testcase_23 AC 112 ms
53,996 KB
testcase_24 AC 116 ms
54,292 KB
testcase_25 AC 107 ms
52,864 KB
testcase_26 AC 102 ms
54,308 KB
testcase_27 AC 114 ms
54,328 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class N499
{
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		long N=sc.nextLong();
		long N7=0;
		int i=0;
		do
		{
			N7+=(N%7)*(int)Math.pow(10, i);
			N/=7;
			i++;
		}while(N>0);
		System.out.println(N7);
	}
}
0