蓝桥杯R格式--高精度算法模拟

蓝桥杯R格式--高精度算法模拟_第1张图片

#include 
using namespace std;
int pos,p1;
int ib[1566];
int an[1567];
int n;
string a,b;
int main()
{
    cin>>n>>a;
    for(int i=a.size()-1; i>=0; i--)
    {
        if(a[i]!='.')
        {
            pos++;
            b.insert(b.end(),a[i]);///string 插char用insert/push_back
        }                           ///插string用+=/append
        else p1=pos;///记录小数点的位置
    }
    for(int i=0; i=5)
    {
        int c=1;
        for(int i=p1; i=p1; i--)
        cout<

你可能感兴趣的:(算法,蓝桥杯,程序人生)