Submission #39859079
Source Code Expand
#include <stdio.h>
int main (void) {
int h, w;
scanf("%i%i", &h, &w);
char s[h][w];
for (int i = 0; h > i; i++) {
for (int j = 0; w > j; j++) {
scanf("%i", &s[i][j]);
}
}
for (int i = 0; h > i; i++) {
for (int j = 0; w > j; j++) {
if (s[i][j] == 0) {
printf(".");
} else {
printf("%c", s[i][j] + 'A' - 1);
}
}
printf("\n");
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - ASCII Art |
| User | InTheBloom |
| Language | C (Clang 10.0.0) |
| Score | 200 |
| Code Size | 408 Byte |
| Status | AC |
| Exec Time | 2 ms |
| Memory | 2016 KiB |
Compile Error
./Main.c:12:16: warning: format specifies type 'int *' but the argument has type 'char *' [-Wformat]
scanf("%i", &s[i][j]);
~~ ^~~~~~~~
%s
1 warning generated.
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 02_max_00.txt, 02_max_01.txt, 03_min_00.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 2 ms | 1908 KiB |
| 00_sample_01.txt | AC | 1 ms | 1892 KiB |
| 00_sample_02.txt | AC | 1 ms | 1952 KiB |
| 00_sample_03.txt | AC | 1 ms | 2008 KiB |
| 01_random_00.txt | AC | 1 ms | 1952 KiB |
| 01_random_01.txt | AC | 1 ms | 2016 KiB |
| 01_random_02.txt | AC | 2 ms | 2008 KiB |
| 01_random_03.txt | AC | 1 ms | 1952 KiB |
| 01_random_04.txt | AC | 1 ms | 1896 KiB |
| 01_random_05.txt | AC | 2 ms | 1908 KiB |
| 02_max_00.txt | AC | 2 ms | 1960 KiB |
| 02_max_01.txt | AC | 2 ms | 2016 KiB |
| 03_min_00.txt | AC | 1 ms | 2008 KiB |