結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
![]() |
提出日時 | 2025-09-06 13:15:49 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 393 bytes |
コンパイル時間 | 407 ms |
コンパイル使用メモリ | 26,704 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-09-06 13:17:37 |
合計ジャッジ時間 | 1,211 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d %d", &h, &w); | ^~~~~~~~~~~~~~~~~~~~~~ main.c:9:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%s", s[i]); | ^~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> char s[202][202]; int main() { int h, w; scanf("%d %d", &h, &w); int i, j; for (i = 0; i < h; i++) scanf("%s", s[i]); for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { if (s[i][j] == '.') continue; if (s[i][j] == '9') s[i][j + 1] = 'Y'; else s[i][j + 4] = 'Y'; j += 5; } } for (i = 0; i < h; i++) printf("%s\n", s[i]); return 0; }