Submission #124468

# Submission time Handle Problem Language Result Execution time Memory
124468 2019-07-03T11:33:42 Z HassenAissa Strange Device (APIO19_strange_device) C++14
0 / 100
2 ms 376 KB
#include <bits/stdc++.h>
using namespace std;


int main()
{
    long long unsigned n,a,b,t,l;
    scanf("%llu%llu%llu",&n,&a,&b);
    int res=0;
    for(long long unsigned i=0;i<n;i++)
    {
        scanf("%llu%llu",&t,&l);
        for(int j=t;j<=l;j++)
            res+=((2*t)%a);
    }
    printf("%d",res);
}

Compilation message

strange_device.cpp: In function 'int main()':
strange_device.cpp:13:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=t;j<=l;j++)
                     ~^~~
strange_device.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%llu%llu%llu",&n,&a,&b);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
strange_device.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%llu%llu",&t,&l);
         ~~~~~^~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -