結果

問題 No.499 7進数変換
ユーザー fjafjafjafjafjafja
提出日時 2017-08-23 02:06:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 1,000 ms
コード長 303 bytes
コンパイル時間 3,383 ms
コンパイル使用メモリ 74,452 KB
実行使用メモリ 41,496 KB
最終ジャッジ日時 2024-04-23 04:52:47
合計ジャッジ時間 7,092 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
41,436 KB
testcase_01 AC 105 ms
41,380 KB
testcase_02 AC 100 ms
40,156 KB
testcase_03 AC 107 ms
41,244 KB
testcase_04 AC 111 ms
41,332 KB
testcase_05 AC 114 ms
41,208 KB
testcase_06 AC 111 ms
41,092 KB
testcase_07 AC 107 ms
41,352 KB
testcase_08 AC 93 ms
39,768 KB
testcase_09 AC 109 ms
41,372 KB
testcase_10 AC 107 ms
40,980 KB
testcase_11 AC 109 ms
41,348 KB
testcase_12 AC 106 ms
41,200 KB
testcase_13 AC 97 ms
40,200 KB
testcase_14 AC 101 ms
40,352 KB
testcase_15 AC 97 ms
40,336 KB
testcase_16 AC 113 ms
41,152 KB
testcase_17 AC 109 ms
41,496 KB
testcase_18 AC 107 ms
41,392 KB
testcase_19 AC 113 ms
41,464 KB
testcase_20 AC 108 ms
41,032 KB
testcase_21 AC 104 ms
41,328 KB
testcase_22 AC 113 ms
41,316 KB
testcase_23 AC 98 ms
40,084 KB
testcase_24 AC 99 ms
40,368 KB
testcase_25 AC 110 ms
41,164 KB
testcase_26 AC 110 ms
41,208 KB
testcase_27 AC 100 ms
40,360 KB
testcase_28 AC 116 ms
40,520 KB
testcase_29 AC 102 ms
40,028 KB
testcase_30 AC 113 ms
41,244 KB
権限があれば一括ダウンロードができます

ソースコード

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)*(long)Math.pow(10, i);
			N/=7;
			i++;
		}while(N>0);
		System.out.println(N7);
	}
}
0