結果

問題 No.499 7進数変換
ユーザー hotaka0213
提出日時 2019-11-17 10:42:51
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 198 bytes
コンパイル時間 957 ms
コンパイル使用メモリ 60,344 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-25 05:46:20
合計ジャッジ時間 1,586 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
using namespace std;
int main(){
	long N;
	int M=0;
	long ans=0;
	cin>>N;
	while(N!=0){
		ans+=pow(10,M)*(N%7);
		M++;
		N/=7;
	}
	cout<<ans<<endl;
	return 0;
}
0