当前位置:网站首页>How many times is PTA 1101 B than a

How many times is PTA 1101 B than a

2022-07-07 18:56:00 Deng sb's father

1101 B yes A How many times

#include <iostream>
using namespace std;
int main()
{
    
	string A;
	int D;
	cin>>A>>D;
	long long int a=stoi(A);
	string B;
	for(int i=A.length()-D;i<A.length();i++)
		B=B+A[i];
	for(int i=0;i<A.length()-D;i++)
		B=B+A[i];
	B=B+'\0';
	
	long long int b= stoi(B);
	double c=b*1.0/a;
	printf("%.2f",c);
}
原网站

版权声明
本文为[Deng sb's father]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071649412545.html