結果
問題 | No.2087 基数の変換 |
ユーザー |
![]() |
提出日時 | 2022-09-30 23:19:29 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 380 bytes |
コンパイル時間 | 1,224 ms |
コンパイル使用メモリ | 28,544 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-23 01:03:58 |
合計ジャッジ時間 | 2,155 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 51 |
ソースコード
#include <stdio.h>int main (void){int n;int m;scanf("%d", &n);scanf("%d", &m);if (0 == m){printf("0\n");return 0;}short s[200000001];//文字列入力用int j = 0;while (0 < m){int i = m % n;s[j] = i;j++;m /= n;}j--;for (; 0 <= j; j--){printf("%d", s[j]);}printf("\n");return 0;}