結果
問題 | No.8032 Unavailability of Inequality Signs |
ユーザー |
![]() |
提出日時 | 2018-04-01 22:40:05 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 212 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 27,776 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 05:59:05 |
合計ジャッジ時間 | 848 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
コンパイルメッセージ
main.c: In function 'main': main.c:3:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | scanf("%d", &n); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | scanf("%d", &n); | ^~~~~ main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:8:9: warning: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 8 | if(a==0)puts("="); | ^~~~ main.c:8:9: note: include '<stdio.h>' or provide a declaration of 'puts' main.c:11:18: warning: implicit declaration of function 'putchar' [-Wimplicit-function-declaration] 11 | if(x&2147483648u)putchar(60); | ^~~~~~~ main.c:11:18: note: include '<stdio.h>' or provide a declaration of 'putchar'
ソースコード
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; }