Submission #60312405
Source Code Expand
Copy
#include <stdio.h>#include <string.h>int main() {int N, D;scanf("%d %d", &N, &D);char S[N + 1];scanf("%s", S);for (int day = 0; day < D; day++) {for (int i = N - 1; i >= 0; i--) {if (S[i] == '@') {S[i] = '.';break;}}}printf("%s\n", S);return 0;
#include <stdio.h> #include <string.h> int main() { int N, D; scanf("%d %d", &N, &D); char S[N + 1]; scanf("%s", S); for (int day = 0; day < D; day++) { for (int i = N - 1; i >= 0; i--) { if (S[i] == '@') { S[i] = '.'; break; } } } printf("%s\n", S); return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Kaiten Sushi |
User | samra17864 |
Language | C (gcc 12.2.0) |
Score | 0 |
Code Size | 394 Byte |
Status | WA |
Exec Time | 2210 ms |
Memory | 1764 KB |
Compile Error
Main.c: In function ‘main’: Main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d %d", &N, &D); | ^~~~~~~~~~~~~~~~~~~~~~ Main.c:9:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%s", S); | ^~~~~~~~~~~~~~
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 350 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 02_random2_00.txt, 02_random2_01.txt, 02_random2_02.txt, 02_random2_03.txt, 02_random2_04.txt, 02_random2_05.txt, 02_random2_06.txt, 02_random2_07.txt, 02_random2_08.txt, 02_random2_09.txt, 02_random2_10.txt, 02_random2_11.txt, 02_random2_12.txt, 02_random2_13.txt, 02_random2_14.txt, 02_random2_15.txt, 02_random2_16.txt, 03_handmade_00.txt, 03_handmade_01.txt, 03_handmade_02.txt, 03_handmade_03.txt, 03_handmade_04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | WA | 1 ms | 1496 KB |
00_sample_01.txt | WA | 1 ms | 1576 KB |
00_sample_02.txt | WA | 0 ms | 1576 KB |
01_random_00.txt | WA | 1621 ms | 1492 KB |
01_random_01.txt | WA | 489 ms | 1680 KB |
01_random_02.txt | TLE | 2207 ms | 1616 KB |
01_random_03.txt | TLE | 2207 ms | 1696 KB |
01_random_04.txt | TLE | 2207 ms | 1684 KB |
02_random2_00.txt | TLE | 2207 ms | 1684 KB |
02_random2_01.txt | TLE | 2207 ms | 1668 KB |
02_random2_02.txt | TLE | 2210 ms | 1688 KB |
02_random2_03.txt | TLE | 2207 ms | 1704 KB |
02_random2_04.txt | TLE | 2207 ms | 1680 KB |
02_random2_05.txt | TLE | 2207 ms | 1664 KB |
02_random2_06.txt | TLE | 2207 ms | 1764 KB |
02_random2_07.txt | TLE | 2207 ms | 1660 KB |
02_random2_08.txt | TLE | 2207 ms | 1692 KB |
02_random2_09.txt | TLE | 2210 ms | 1660 KB |
02_random2_10.txt | TLE | 2208 ms | 1696 KB |
02_random2_11.txt | TLE | 2207 ms | 1680 KB |
02_random2_12.txt | TLE | 2207 ms | 1660 KB |
02_random2_13.txt | TLE | 2207 ms | 1660 KB |
02_random2_14.txt | TLE | 2207 ms | 1688 KB |
02_random2_15.txt | TLE | 2205 ms | 1684 KB |
02_random2_16.txt | TLE | 2210 ms | 1716 KB |
03_handmade_00.txt | TLE | 2207 ms | 1656 KB |
03_handmade_01.txt | TLE | 2207 ms | 1712 KB |
03_handmade_02.txt | WA | 1 ms | 1612 KB |
03_handmade_03.txt | WA | 1 ms | 1596 KB |
03_handmade_04.txt | AC | 1 ms | 1616 KB |