Submission #445093

# Submission time Handle Problem Language Result Execution time Memory
445093 2021-07-16T12:02:34 Z RaadSharar777 Lutrija (COCI19_lutrija) C++17
0 / 70
1 ms 292 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long int lint;
bool isprime(lint n) {
    for (lint i = 2; i * i <= n ; i++) {
        if (n % i == 0) {
            return false;
        }
    }
    return true;
}
int main()
{
    lint a,b;
    cin >> a >> b;
    if(a == 2 || b == 2) {
        if(isprime(b + a)) {
            cout << 3 << endl;
            cout << a << " " << b + a << " " << b << endl; 
        }
    } else if (abs(b-a) == 2) {
        cout << 2 << endl;
        cout << a << " " << b << endl;
    } else {
        cout << -1 << endl;
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Incorrect 1 ms 204 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 292 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 292 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -