結果

問題 No.3032 Unavailability of Inequality Signs
ユーザー rickythetarickytheta
提出日時 2018-04-01 22:40:05
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 212 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 27,280 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-08 12:46:01
合計ジャッジ時間 1,098 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 0 ms
4,376 KB
testcase_03 AC 0 ms
4,376 KB
testcase_04 AC 0 ms
4,380 KB
testcase_05 AC 0 ms
4,376 KB
testcase_06 AC 0 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: 関数 ‘main’ 内:
main.c:3:1: 警告: 関数 ‘scanf’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    3 | scanf("%d", &n);
      | ^~~~~
main.c:1:1: 備考: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:3:1: 警告: 組み込み関数 ‘scanf’ の互換性がない暗黙的な宣言です [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d", &n);
      | ^~~~~
main.c:3:1: 備考: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:8:9: 警告: 関数 ‘puts’ の暗黙的な宣言です [-Wimplicit-function-declaration]
    8 | if(a==0)puts("=");
      |         ^~~~
main.c:8:9: 備考: include ‘<stdio.h>’ or provide a declaration of ‘puts’
main.c:11:18: 警告: 関数 ‘putchar’ の暗黙的な宣言です [-Wimplicit-function-declaration]
   11 | if(x&2147483648u)putchar(60);
      |                  ^~~~~~~
main.c:11:18: 備考: include ‘<stdio.h>’ or provide a declaration of ‘putchar’

ソースコード

diff #

int main(){
int n;
scanf("%d", &n);
while(n--){
int a,b;
scanf("%d%d", &a, &b);
a -= b;
if(a==0)puts("=");
else{
unsigned x = (unsigned)a;
if(x&2147483648u)putchar(60);
else putchar(62);
puts("");
}
}
return 0;
}
0