题目大意
高桥每次旋转 度,问他转多少次之后能回到原来状态。
解题思路
求高桥转多少次之后能回到原来状态,就是问 ,也就是 。
code
#include <bits/stdc++.h>
using namespace std;
int X;
int main(){
cin>>X;
cout<<lcm(X,360)/X;
return 0;
}高桥每次旋转 度,问他转多少次之后能回到原来状态。
求高桥转多少次之后能回到原来状态,就是问 ,也就是 。
#include <bits/stdc++.h>
using namespace std;
int X;
int main(){
cin>>X;
cout<<lcm(X,360)/X;
return 0;
}