結果
問題 |
No.499 7進数変換
|
ユーザー |
![]() |
提出日時 | 2017-05-17 23:56:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 270 bytes |
コンパイル時間 | 365 ms |
コンパイル使用メモリ | 46,028 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-17 21:06:13 |
合計ジャッジ時間 | 1,270 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 |
ソースコード
#include <cstdio> #include <string> using namespace std; string itoa(int n,int b){ if(n==0) return string("0"); string s=""; while(n){ s=to_string(n%b)+s; n/=b; } return s; } int main(){ int n; int _=scanf("%d",&n); puts(itoa(n,7).c_str()); return 0; }