結果

問題 No.1806 Rotating Golem
ユーザー Maeda
提出日時 2025-03-11 16:09:27
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 209 bytes
コンパイル時間 405 ms
コンパイル使用メモリ 24,448 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2025-03-11 16:09:29
合計ジャッジ時間 1,436 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%c",&a);
      |     ^~~~~~~~~~~~~~
main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |     scanf("%c",&b);
      |     ^~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

void main(void){
    char a = 'a';
    scanf("%c",&a);
    char b = 'b';
    scanf("%c",&b);
    int rotation = 0;
    if(a != b){
        rotation = b-a;
    }
    printf("%d",rotation);
}
0