結果

問題 No.499 7進数変換
ユーザー mencottonmencotton
提出日時 2018-01-18 20:05:25
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 56 ms / 1,000 ms
コード長 383 bytes
コンパイル時間 3,566 ms
コンパイル使用メモリ 98,852 KB
実行使用メモリ 22,976 KB
最終ジャッジ日時 2023-08-25 23:24:17
合計ジャッジ時間 4,925 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
20,720 KB
testcase_01 AC 53 ms
20,728 KB
testcase_02 AC 54 ms
20,904 KB
testcase_03 AC 53 ms
18,684 KB
testcase_04 AC 54 ms
22,976 KB
testcase_05 AC 54 ms
20,764 KB
testcase_06 AC 53 ms
18,832 KB
testcase_07 AC 54 ms
20,832 KB
testcase_08 AC 53 ms
22,824 KB
testcase_09 AC 54 ms
22,784 KB
testcase_10 AC 53 ms
18,812 KB
testcase_11 AC 54 ms
20,832 KB
testcase_12 AC 54 ms
20,796 KB
testcase_13 AC 54 ms
20,728 KB
testcase_14 AC 54 ms
20,928 KB
testcase_15 AC 54 ms
20,724 KB
testcase_16 AC 54 ms
20,736 KB
testcase_17 AC 54 ms
20,916 KB
testcase_18 AC 53 ms
20,780 KB
testcase_19 AC 53 ms
20,792 KB
testcase_20 AC 52 ms
20,888 KB
testcase_21 AC 54 ms
20,844 KB
testcase_22 AC 53 ms
20,724 KB
testcase_23 AC 53 ms
22,824 KB
testcase_24 AC 54 ms
22,704 KB
testcase_25 AC 54 ms
20,796 KB
testcase_26 AC 54 ms
20,932 KB
testcase_27 AC 54 ms
22,872 KB
testcase_28 AC 55 ms
22,904 KB
testcase_29 AC 53 ms
20,724 KB
testcase_30 AC 56 ms
22,872 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace _499
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string ret = "";
            for (; n >= 7; n++)
            {
                ret = n % 7 + ret;
                n /= 7;
                n--;
            }
            Console.WriteLine(n + ret);
        }
    }
}
0