結果

問題 No.499 7進数変換
ユーザー ninoinui
提出日時 2020-02-03 10:31:00
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 208 bytes
コンパイル時間 1,405 ms
コンパイル使用メモリ 168,952 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-18 21:39:52
合計ジャッジ時間 2,204 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
  int N;
  cin >> N;
  if (!N) return cout << 0 << "\n", 0;
  string ans;
  while (N) ans = to_string(N % 7) + ans, N /= 7;
  cout << ans << "\n";
}
0