結果
| 問題 | No.499 7進数変換 |
| コンテスト | |
| ユーザー |
samplelpmas
|
| 提出日時 | 2017-04-09 19:39:56 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 141 ms / 1,000 ms |
| コード長 | 420 bytes |
| コンパイル時間 | 2,176 ms |
| コンパイル使用メモリ | 74,280 KB |
| 実行使用メモリ | 54,960 KB |
| 最終ジャッジ日時 | 2024-07-18 01:36:52 |
| 合計ジャッジ時間 | 7,369 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int decimal = sc.nextInt();
long septenary = 0;
long place = 1;
while (decimal > 0) {
septenary += (decimal % 7) * place;
decimal /= 7;
place *= 10;
}
System.out.println(septenary);
}
}
samplelpmas