結果
| 問題 | No.499 7進数変換 |
| コンテスト | |
| ユーザー |
chacoder1
|
| 提出日時 | 2021-02-17 20:57:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 1,000 ms |
| コード長 | 351 bytes |
| コンパイル時間 | 1,891 ms |
| コンパイル使用メモリ | 194,076 KB |
| 最終ジャッジ日時 | 2025-01-18 21:52:04 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
int N;
cin>>N;
if(N==0){
cout<<0<<endl;
return 0;
}
vector<int>vec;
while(N){
vec.push_back(N%7);
N/=7;
}
for(int i=0;i<vec.size();i++){
cout<<vec[vec.size()-i-1];
}
cout<<endl;
return 0;
}
chacoder1