結果

問題 No.499 7進数変換
ユーザー aaaaaaiu
提出日時 2019-07-31 00:01:15
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 250 bytes
コンパイル時間 2,065 ms
コンパイル使用メモリ 193,208 KB
最終ジャッジ日時 2025-01-07 10:12:37
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int n;
    cin>>n;
    ll ans = 0;
    ll d=1;
    while (n) {
        ans += n%7*d;
        d *= 10;
        n /= 7;
    }
    cout << ans << endl;
    return 0;
}
0