結果
| 問題 | No.428 小数から逃げる夢 | 
| コンテスト | |
| ユーザー |  btk | 
| 提出日時 | 2016-10-02 22:29:05 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 1,000 ms | 
| コード長 | 660 bytes | 
| コンパイル時間 | 1,636 ms | 
| コンパイル使用メモリ | 169,188 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-21 13:14:25 | 
| 合計ジャッジ時間 | 4,036 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 100 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}init;
typedef long long LL;
typedef vector<int> V;
string s="1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991";
int main(){
    int N;cin>>N;
    int m=s.size();
    V res(m);
    for(int i=0;i<m;i++)res[i]=s[i]-'0';
    int c=0;
    for(int i=m-1;i>=0;i--){
        res[i]=res[i]*N+c;
        c=res[i]/10;
        res[i]%=10;
    }
    cout<<c<<".";
    for(auto &it:res)cout<<it;
    cout<<endl;
    return 0;
}
            
            
            
        