85分求助

P4057 [Code+#1] 晨跑

对不起,倒数第三行多了个分号
by 情谊、暴走 @ 2019-02-06 21:17:55


请问您最后三点是不是TLE?
by 花满楼_落枫 @ 2019-02-18 20:32:50


因为我太蒟蒻~~(反正我是TLE)~~,所以我只能发一份我的代码,希望对你有所帮助。 ``` // luogu-judger-enable-o2 #include<iostream> #include<cmath> using namespace std; int main(){ std::ios::sync_with_stdio(false); int a,b,c,i; cin>>a>>b>>c; for(i=1;;i++){ if(max(a,max(b,c))*i%a==0&&max(a,max(b,c))*i%b==0&&max(a,max(b,c))*i%c==0) { cout<<max(a,max(b,c))*i<<endl; break; } } return 0; } ```
by 花满楼_落枫 @ 2019-02-18 20:36:48


@[花满楼_繁星](/space/show?uid=116608) GCD啊
by 灵光一闪 @ 2019-06-01 12:56:17


@[洛谷亿岁](/space/show?uid=122605) ?
by 花满楼_落枫 @ 2019-06-01 13:10:09


我都忘了这是什么时候回复的了
by 花满楼_落枫 @ 2019-06-01 13:11:13


看了看题解终于A了。。。
by 花满楼_落枫 @ 2019-06-01 13:11:55


@[花满楼_繁星](/space/show?uid=116608) 这还用看题解? 3个数求最小公倍数啊
by 灵光一闪 @ 2019-06-01 13:52:06


~~除了int爆炸有点坑以外~~
by 灵光一闪 @ 2019-06-01 13:52:34


@[洛谷亿岁](/space/show?uid=122605) 我倒没想到这点。。。~~毕竟我是蒟蒻啊~~
by 花满楼_落枫 @ 2019-06-01 14:02:11


| 下一页