ამოხსნების სტატუსი

ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.


გაგზავნის თარიღი: 18.06.2022 12:09:53

ამოცანა: ჰამაკები

მომხმარებელი: gvanca

ვერდიქტი: ამოუხსნელი

შეფასება: 0 ქულა







#include <bits/stdc++.h>

using namespace std;
#define f first
#define s second
long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
string s;
int main()
{
    cin>>n>>k;
    for (int i=1; i<=n; i++){
        cin>>x;
        ans+=x%k;
    }
    cout<<ans<<endl;
    
}

#include <bits/stdc++.h>

using namespace std;
#define f first
#define s second
long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
string s;
int main()
{
    cin>>n>>k;
    for (int i=1; i<=n; i++){
        cin>>x;
        ans+=x%k;
    }
    cout<<ans<<endl;
    
}
main.cpp:25:11: error: redefinition of 'long long int n'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
           ^
main.cpp:7:11: note: 'long long int n' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
           ^
main.cpp:25:13: error: redefinition of 'long long int m'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
             ^
main.cpp:7:13: note: 'long long int m' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
             ^
main.cpp:25:15: error: redefinition of 'long long int l'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
               ^
main.cpp:7:15: note: 'long long int l' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
               ^
main.cpp:25:17: error: redefinition of 'long long int r'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                 ^
main.cpp:7:17: note: 'long long int r' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                 ^
main.cpp:25:19: error: redefinition of 'long long int anss'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                   ^~~~
main.cpp:7:19: note: 'long long int anss' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                   ^~~~
main.cpp:25:24: error: redefinition of 'long long int ans'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                        ^~~
main.cpp:7:24: note: 'long long int ans' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                        ^~~
main.cpp:25:28: error: redefinition of 'long long int x'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                            ^
main.cpp:7:28: note: 'long long int x' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                            ^
main.cpp:25:30: error: redefinition of 'long long int y'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                              ^
main.cpp:7:30: note: 'long long int y' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                              ^
main.cpp:25:32: error: redefinition of 'long long int z'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                                ^
main.cpp:7:32: note: 'long long int z' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                                ^
main.cpp:25:43: error: redefinition of 'long long int a [1000001]'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                                           ^
main.cpp:7:34: note: 'long long int a [1000001]' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                                  ^
main.cpp:25:54: error: redefinition of 'long long int b [1000001]'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                                                      ^
main.cpp:7:45: note: 'long long int b [1000001]' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                                             ^
main.cpp:25:56: error: redefinition of 'long long int k'
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                                                        ^
main.cpp:7:56: note: 'long long int k' previously declared here
 long long n,m,l,r,anss,ans,x,y,z,a[1000001],b[1000001],k;
                                                        ^
main.cpp:24:11: error: redefinition of 'std::__cxx11::string second'
 #define s second
           ^
main.cpp:26:8: note: in expansion of macro 's'
 string s;
        ^
main.cpp:6:11: note: 'std::__cxx11::string second' previously declared here
 #define s second
           ^
main.cpp:8:8: note: in expansion of macro 's'
 string s;
        ^
main.cpp: In function 'int main()':
main.cpp:27:5: error: redefinition of 'int main()'
 int main()
     ^~~~
main.cpp:9:5: note: 'int main()' previously defined here
 int main()
     ^~~~