結果
問題 | No.82 市松模様 |
ユーザー | umashika |
提出日時 | 2016-02-25 01:44:37 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 331 bytes |
コンパイル時間 | 114 ms |
コンパイル使用メモリ | 20,884 KB |
実行使用メモリ | 4,348 KB |
最終ジャッジ日時 | 2023-10-23 19:56:43 |
合計ジャッジ時間 | 694 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 1 ms
4,348 KB |
testcase_02 | AC | 0 ms
4,348 KB |
testcase_03 | AC | 1 ms
4,348 KB |
testcase_04 | AC | 1 ms
4,348 KB |
testcase_05 | AC | 1 ms
4,348 KB |
testcase_06 | AC | 1 ms
4,348 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 0 ms
4,348 KB |
コンパイルメッセージ
main.c: In function ‘main’: main.c:12:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 12 | scanf("%d %d %c",&column,&row,&c); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main() { char c; int i,j; int row; //行 int column;//列 char a[2]={'W','B'}; int k; scanf("%d %d %c",&column,&row,&c); if(c=='W'){k = 0;} else{k = 1;} for(i=0;i<row;i++){ for(j=0;j<column;j++){ printf("%c",a[k%2]); k++; } printf("\n"); } return 0; }