結果
| 問題 | No.499 7進数変換 |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2017-04-12 01:14:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 765 bytes |
| コンパイル時間 | 590 ms |
| コンパイル使用メモリ | 86,224 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 09:09:28 |
| 合計ジャッジ時間 | 1,480 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 499.cc: No.499 7進数変換 - yukicoder
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
using namespace std;
/* constant */
/* typedef */
typedef vector<int> vi;
/* global variables */
/* subroutines */
/* main */
int main() {
int n;
cin >> n;
if (n == 0) {
puts("0");
return 0;
}
vi v;
while (n > 0) {
v.push_back(n % 7);
n /= 7;
}
for (int i = v.size() - 1; i >= 0; i--) printf("%d", v[i]);
putchar('\n');
return 0;
}
tnakao0123