結果
問題 | No.82 市松模様 |
ユーザー |
|
提出日時 | 2017-03-15 15:58:18 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 238 bytes |
コンパイル時間 | 217 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-03 23:59:33 |
合計ジャッジ時間 | 750 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 7 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d %d %c",&w,&h,&c); | ^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main(void){int i,j,w,h;char c;scanf("%d %d %c",&w,&h,&c);for(i=0;i<h;i++){for(j=0;j<w;j++){if((i+j)%2==1) printf("%c",c);else printf("%c",(c=='B'?'W':'B'));}printf("\n");}return 0;}