結果
| 問題 | 
                            No.499 7進数変換
                             | 
                    
| コンテスト | |
| ユーザー | 
                             sora410_t
                         | 
                    
| 提出日時 | 2017-11-05 00:58:50 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 303 bytes | 
| コンパイル時間 | 564 ms | 
| コンパイル使用メモリ | 58,588 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-24 01:15:11 | 
| 合計ジャッジ時間 | 1,885 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 30 RE * 1 | 
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
int main() {
	int n;
	std::cin >> n;
	std::string str_n7 {""};
	for (;;) {
		if (n == 0) {
			break;
		}
		str_n7 += std::to_string(n % 7);
		n /= 7;
	}
	std::reverse(str_n7.begin(), str_n7.end());
	std::cout << std::stol(str_n7) << "\n";
}
            
            
            
        
            
sora410_t