Submission #24658498
Source Code Expand
Copy
#include <bits/stdc++.h>using namespace std;int main() {int pw, x1, x2 ,x3, x4;cin >> pw;x4 = pw%10;x3 = (pw/10)%10;x2 = (pw/100)%10;x1 = pw/1000;if ( x1==x2 && x2==x3 && x3==x4 ) {cout << "Weak" << endl;} else if ( (x1+1)%10==x2 && (x2+1)%10==x3 && (x3+1)%10==x4 ) {cout << "Weak" << endl;} else {cout << "Strong" << endl;}}
#include <bits/stdc++.h> using namespace std; int main() { int pw, x1, x2 ,x3, x4; cin >> pw; x4 = pw%10; x3 = (pw/10)%10; x2 = (pw/100)%10; x1 = pw/1000; if ( x1==x2 && x2==x3 && x3==x4 ) { cout << "Weak" << endl; } else if ( (x1+1)%10==x2 && (x2+1)%10==x3 && (x3+1)%10==x4 ) { cout << "Weak" << endl; } else { cout << "Strong" << endl; } }
Submission Info
Submission Time | |
---|---|
Task | B - Weak Password |
User | RoadLynton27 |
Language | C++ (GCC 9.2.1) |
Score | 200 |
Code Size | 398 Byte |
Status | AC |
Exec Time | 6 ms |
Memory | 3620 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example_00.txt, example_01.txt, example_02.txt |
All | example_00.txt, example_01.txt, example_02.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
example_00.txt | AC | 6 ms | 3388 KB |
example_01.txt | AC | 2 ms | 3428 KB |
example_02.txt | AC | 2 ms | 3564 KB |
test_00.txt | AC | 2 ms | 3520 KB |
test_01.txt | AC | 2 ms | 3592 KB |
test_02.txt | AC | 2 ms | 3604 KB |
test_03.txt | AC | 2 ms | 3560 KB |
test_04.txt | AC | 1 ms | 3444 KB |
test_05.txt | AC | 1 ms | 3396 KB |
test_06.txt | AC | 2 ms | 3592 KB |
test_07.txt | AC | 2 ms | 3584 KB |
test_08.txt | AC | 2 ms | 3580 KB |
test_09.txt | AC | 2 ms | 3404 KB |
test_10.txt | AC | 2 ms | 3620 KB |
test_11.txt | AC | 2 ms | 3436 KB |
test_12.txt | AC | 2 ms | 3592 KB |
test_13.txt | AC | 2 ms | 3432 KB |
test_14.txt | AC | 4 ms | 3544 KB |