結果
問題 |
No.2087 基数の変換
|
ユーザー |
|
提出日時 | 2023-11-08 03:29:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 309 bytes |
コンパイル時間 | 1,615 ms |
コンパイル使用メモリ | 192,964 KB |
最終ジャッジ日時 | 2025-02-17 20:03:06 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 49 WA * 2 |
ソースコード
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define ll long long ll N, M; int main() { cin >> N >> M; string ans = ""; ll k = N; while (M > 0) { ll rem = M % N; ans += char('0'+(rem)); M /= N; } reverse(ans.begin(), ans.end()); cout << ans << endl; }