結果
問題 |
No.499 7進数変換
|
ユーザー |
![]() |
提出日時 | 2018-02-16 15:46:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 302 bytes |
コンパイル時間 | 641 ms |
コンパイル使用メモリ | 68,556 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-11 17:25:17 |
合計ジャッジ時間 | 1,576 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 31 |
ソースコード
#include<iostream> #include<cmath> using namespace std; int main(){ bool flag; long long int N,i,a,num; cin >> N; for(i=15;i>=0;i--){ num = pow(7,i); a = N / num; N = N % num; if(a>0) flag = true; if(flag) cout << a; } return 0; }