結果
問題 | No.757 チャンパーノウン定数 (2) |
ユーザー |
|
提出日時 | 2018-12-02 01:08:01 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 162 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 99,776 KB |
最終ジャッジ日時 | 2024-06-27 04:58:53 |
合計ジャッジ時間 | 6,961 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 -- * 1 |
other | AC * 10 WA * 16 TLE * 1 -- * 24 |
コンパイルメッセージ
Syntax OK
ソースコード
#!/usr/bin/rubystarting=1bse=gets.to_iwhile getsn=$_.to_in+=starting-2digits=1expbase=1while (x=digits*expbase*(bse-1))<=nn-=xdigits+=1expbase*=bseendnum=expbase+n/digitsd=digits-1-n%digitsd.times{num/=bse}puts num%bseend