結果
| 問題 |
No.757 チャンパーノウン定数 (2)
|
| コンテスト | |
| ユーザー |
leaf+
|
| 提出日時 | 2019-04-14 09:34:41 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 440 bytes |
| コンパイル時間 | 1,428 ms |
| コンパイル使用メモリ | 62,328 KB |
| 実行使用メモリ | 134,948 KB |
| 最終ジャッジ日時 | 2024-09-16 15:51:26 |
| 合計ジャッジ時間 | 6,626 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 -- * 1 |
| other | AC * 17 WA * 1 TLE * 1 -- * 32 |
ソースコード
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main() {
string cq, y;
int b, i, t;
long d, ec = 0;
cin >> b >> d;
for (i = 0; d > 0; i++) {
ec += d % 10 * pow(b, i);
d /= 10;
}
for (i = 1; cq.length() < ec; i++) {
t = i;
while (t > 0) {
y = to_string(t % b) + y;
t /= b;
}
cq += y;
y = "";
}
cout << cq[ec-1] << endl;
return 0;
}
leaf+