Open utterances-bot opened 3 years ago
bài này ít ra phải cho 1 giải thích case mẫu để mn hiểu hơn chứ
Time limit quá khắc khe, thành ra bóp nghẹt tư duy sáng tạo.
mình làm thế này, không biết sai chỗ nào mà không thể nộp bài được :)))
```cpp
#include
@Dam-Tieu-Mac Lừa hay đấy :))
nộp 4 lần thì AC lần lượt là 25/30 , 27/30 , 29/30 , 30/30 =))
kh giải thích test 2 lại đi giải thích test 1 =))
ko đọc kĩ đề, chin nhỗi :>>> @ApokPhuoc
Giới hạn là 5ms mà bài mình 3ms cũng time limit là sao nhỉ
python3 làm kiểu gì với 5 ms?
Đồng dư thức và sử dụng công thức đã chứng minh O(1)
Time limit bài này bruh quá =)))) Cùng 1 code nộp vài lần mới AC.
nộp lại cùng 1 bài nhưng mỗi lần lại ra số case đúng khác nhau =)) test nhân phẩm hả tr
0ms cũng ra Time limit :))
em xin chịu thua :((
30/30 test dưới 5ms mà sao TLE nhỉ? 👀
time limit bài này ảo vải :))))
Bài này mình sai chỗ nào mà bị time exceeded vậy mọi người
int main() { int s1, s2, s3; int total; scanf("%d %d %d", &s1, &s2, &s3);
int a = sqrt(s2)sqrt(s3)/s1; int b= s2/a; int h=s1/b; printf("%d", 4(a+b+h));
return 0; }
toàn time limit exceeded
Đây là lời giải của mình đã AC. Nếu bạn đã cố gắng mà chưa làm được thì có thể tham khảo lời giải của mình.
#include <iostream>
#include <cmath>
#define MOD 1000000007
void solve() {
long double s1, s2, s3;
std::cin >> s1 >> s2 >> s3;
s2 = s1 * s2 / s3;
s2 = std::sqrt(s2);
s1 /= s2;
s3 /= s1;
long long result = static_cast<long long>((s1 + s2 + s3) * 4LL) % MOD;
std::cout << result << std::endl;
}
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
int t = 1;
// std::cin >> t;
while (t--) {
solve();
}
return 0;
}
Chi tiết bài tập - Luyện Code Online
https://luyencode.net/problem/HHCN