Submission #3689616
Source Code Expand
#include <iostream> #include <bits/stdc++.h> using namespace std; char str[200]; char regis[5]; char num[5]={'1','3','5','7','9'}; int changetime=0; int main() { cin>>str; for(int i=0;i<strlen(str);i++) { for(int j=0;j<5;j++) { if(regis[j]!=str[i]) { if(changetime>5) { cout<<"-1"; return 0; } changetime++; regis[changetime]=str[i]; break; } } } for(int i=0;i<strlen(str);i++) { for(int j=0;j<5;j++) { if(regis[j]==str[i]) { //cout<<"yep"; str[i]=j*2-1+48; } } } cout<<str; }
Submission Info
Submission Time | |
---|---|
Task | D - 文字列と素数 |
User | luogu_bot3 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 594 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 50 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00, 00_sample_01, 00_sample_02 |
All | 00_sample_00, 00_sample_01, 00_sample_02, 05_rand_00, 05_rand_01, 05_rand_02, 05_rand_03, 05_rand_04, 05_rand_05, 05_rand_06, 05_rand_07, 05_rand_08, 05_rand_09, 15_rand_00, 15_rand_01, 15_rand_02, 15_rand_03, 15_rand_04, 15_rand_05, 15_rand_06, 15_rand_07, 15_rand_08, 15_rand_09, 20_teuti_00, 20_teuti_01 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00 | AC | 1 ms | 256 KB |
00_sample_01 | WA | 1 ms | 256 KB |
00_sample_02 | AC | 1 ms | 256 KB |
05_rand_00 | WA | 1 ms | 256 KB |
05_rand_01 | AC | 1 ms | 256 KB |
05_rand_02 | WA | 1 ms | 256 KB |
05_rand_03 | WA | 1 ms | 256 KB |
05_rand_04 | WA | 1 ms | 256 KB |
05_rand_05 | WA | 1 ms | 256 KB |
05_rand_06 | WA | 1 ms | 256 KB |
05_rand_07 | WA | 1 ms | 256 KB |
05_rand_08 | AC | 1 ms | 256 KB |
05_rand_09 | WA | 1 ms | 256 KB |
15_rand_00 | WA | 1 ms | 256 KB |
15_rand_01 | WA | 1 ms | 256 KB |
15_rand_02 | AC | 1 ms | 256 KB |
15_rand_03 | WA | 1 ms | 256 KB |
15_rand_04 | WA | 1 ms | 256 KB |
15_rand_05 | AC | 1 ms | 256 KB |
15_rand_06 | WA | 1 ms | 256 KB |
15_rand_07 | WA | 1 ms | 256 KB |
15_rand_08 | AC | 1 ms | 256 KB |
15_rand_09 | WA | 1 ms | 256 KB |
20_teuti_00 | AC | 1 ms | 256 KB |
20_teuti_01 | WA | 1 ms | 256 KB |