結果

問題 No.499 7進数変換
ユーザー rogi52
提出日時 2020-11-14 15:46:30
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 392 bytes
コンパイル時間 1,436 ms
コンパイル使用メモリ 168,720 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-22 23:07:27
合計ジャッジ時間 2,423 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);

    int N; cin >> N;
    vector<int> ans;
    int f = 1;
    while(N > 0){
        ans.emplace_back(N % 7);
        N /= 7;
    }
    reverse(ans.begin(), ans.end());
    for(auto a : ans) cout << a;
    cout << endl;
}
0