結果
| 問題 | No.499 7進数変換 |
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-07-17 22:00:22 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 250 bytes |
| 記録 | |
| コンパイル時間 | 256 ms |
| コンパイル使用メモリ | 59,888 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-24 13:53:51 |
| 合計ジャッジ時間 | 1,306 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
ソースコード
#include<stdio.h>
#include<string>
using namespace std;
main(){
int N;
scanf("%d",&N);
string str;
while(N!=0){
char c = N%7+'0';
str = c + str;
N /= 7;
}
printf("%s\n",str.empty()?"0":str.c_str());
}
Bantako