結果

問題 No.499 7進数変換
ユーザー Konton7
提出日時 2020-01-14 14:55:01
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 2,320 ms
コンパイル使用メモリ 194,200 KB
最終ジャッジ日時 2025-01-08 17:59:10
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;


int main(){
    int a;
    cin >> a;
    string ans;
    while (a > 0){
        ans += (a % 7) + '0';
        a /= 7;
    }
    reverse(ans.begin(), ans.end());
    cout << ans << endl;
    
    return 0;

}
0