結果
| 問題 | No.499 7進数変換 |
| コンテスト | |
| ユーザー |
yukiteru
|
| 提出日時 | 2018-02-07 21:58:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 671 bytes |
| コンパイル時間 | 1,004 ms |
| コンパイル使用メモリ | 81,932 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-19 00:36:22 |
| 合計ジャッジ時間 | 1,744 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#include<vector>
#include<utility>
#include<stack>
#include<queue>
#include<list>
#include<bitset>
#include<functional>
#define FOR(i, a, b) for(int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define MOD 1000000007
#define INF 1000000000
#define PI 3.14159265358979
using namespace std;
typedef pair<int, int> P;
int main(void) {
long long int n;
int dp[1000] = {};
int p = 1;
cin >> n;
while (1) {
dp[p] = n % 7;
n /= 7;
if (n <= 0) {
break;
}
p++;
}
RFOR(i, p, 1) {
cout << dp[i];
}
cout << endl;
return 0;
}
yukiteru