| Task: | Kortit |
| Sender: | Ellujammu |
| Submission time: | 2022-10-31 15:46:49 +0200 |
| Language: | C++ (C++11) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.00 s | details |
| #2 | WRONG ANSWER | 0.00 s | details |
| #3 | WRONG ANSWER | 0.00 s | details |
| #4 | WRONG ANSWER | 0.00 s | details |
| #5 | WRONG ANSWER | 0.00 s | details |
| #6 | WRONG ANSWER | 0.00 s | details |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:17:39: warning: comparison of constant '53' with boolean expression is always true [-Wbool-compare]
17 | else if (27 <= korttien_maara < 53) {
| ~~~~~~~~~~~~~~~~~~~~~^~~~
input/code.cpp:17:21: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
17 | else if (27 <= korttien_maara < 53) {
| ~~~^~~~~~~~~~~~~~~~~Code
#include <iostream>
using namespace std;
int main() {
// Maija saa varmasti punaisen ja mustan jos n > 52/2=26
int korttien_maara;
cin >> korttien_maara;
cout << "Korttien maara: " << korttien_maara <<endl;
if ( (korttien_maara == 1) || (korttien_maara == 0)) {
cout << "NO";
}
else if ((korttien_maara < 27) && (1 < korttien_maara)) {
cout << "MAYBE";
}
else if (27 <= korttien_maara < 53) {
cout << "YES";
}
}
Test details
Test 1
Verdict: WRONG ANSWER
| input |
|---|
| 0 |
| correct output |
|---|
| NO |
| user output |
|---|
| Korttien maara: 0 NO |
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 1 |
| correct output |
|---|
| NO |
| user output |
|---|
| Korttien maara: 1 NO |
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 2 |
| correct output |
|---|
| MAYBE |
| user output |
|---|
| Korttien maara: 2 MAYBE |
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 26 |
| correct output |
|---|
| MAYBE |
| user output |
|---|
| Korttien maara: 26 MAYBE |
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 27 |
| correct output |
|---|
| YES |
| user output |
|---|
| Korttien maara: 27 YES |
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 52 |
| correct output |
|---|
| YES |
| user output |
|---|
| Korttien maara: 52 YES |
