結果
| 問題 | No.499 7進数変換 |
| コンテスト | |
| ユーザー |
WA_TLE
|
| 提出日時 | 2017-04-07 23:22:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 478 bytes |
| コンパイル時間 | 472 ms |
| コンパイル使用メモリ | 49,664 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-16 03:04:05 |
| 合計ジャッジ時間 | 1,471 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:16:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
16 | scanf("%lld",&N);
| ~~~~~^~~~~~~~~~~
ソースコード
#include<deque>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<functional>
#define fir first
#define sec second
#define mp make_pair
#define mt make_tuple
#define pub push_back
using namespace std;
typedef long long int llint;
int main(void){
deque<int> a;
long long int i=0,N;
scanf("%lld",&N);
while(-1){
a.push_front(N%7);
N/=7;
if(N==0){
break;
}
}
while(!a.empty()){
printf("%d",a.front());
a.pop_front();
}
printf("\n");
return 0;
}
WA_TLE