萌新求调红题玄一关

P1046 [NOIP2005 普及组] 陶陶摘苹果

_Hzx_ @ 2024-06-08 11:46:12

通过观察样例然后得出结论样例过了但是全WA

提交记录

代码

#include <bits/stdc++.h>

using namespace std;

int k, a[11];

int main(){
    for (int i = 1; i <= 10; i++)
        scanf("%d", &a[i]);
    scanf("%d", &k);
    printf("%d\n", (a[2] - a[3]) / 10);
}

求调


by weak_in_code @ 2024-06-08 11:53:42

@ilibilib 有被笑到。


by _Hzx_ @ 2024-06-08 11:54:51

@ilibilib 你这代码明显MLE掉吧不开O2


by _Hzx_ @ 2024-06-08 11:55:19

@ilibilib "打中文,scanf不写&


by _Hzx_ @ 2024-06-08 11:55:46

@ilibilib #define int long long 用 int main 写不了吧


by _Hzx_ @ 2024-06-08 11:56:33

@weak_in_code 所以大佬您知道怎么做吗


by weak_in_code @ 2024-06-08 11:56:38

@huang_zhi_xia 绷。


by koukilee @ 2024-06-08 11:56:55

@weak_in_code %%%大佬


by weak_in_code @ 2024-06-08 11:57:19

@koukilee 您才是大佬。


by cjh20090318 @ 2024-06-08 11:57:32

@weak_in_code %%%大佬


by Dream_poetry @ 2024-06-08 11:57:51

@huang_zhi_xia 用 k+30 和每个 a_i 比较就行了


上一页 | 下一页