結果
問題 | No.499 7進数変換 |
ユーザー |
![]() |
提出日時 | 2017-04-07 22:26:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 484 bytes |
コンパイル時間 | 1,464 ms |
コンパイル使用メモリ | 167,044 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-16 00:53:11 |
合計ジャッジ時間 | 2,308 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define FOR(i,l,r) for(int i = (int) (l);i < (int) (r);i++)#define ALL(x) x.begin(),x.end()template<typename T> bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; }template<typename T> bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; }typedef long long ll;ll N;int main(){cin >> N;string ans;do{char c = '0' + N % 7;ans = c + ans;}while(N /= 7);cout << ans << endl;return 0;}