結果

問題 No.138 化石のバージョン
ユーザー くれちー
提出日時 2016-08-26 10:39:23
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 680 ms
コンパイル使用メモリ 20,352 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-08 04:02:08
合計ジャッジ時間 1,758 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 14
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |                 scanf("%d.%d.%d", &a[i], &b[i], &c[i]);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main() {
	int a[2], b[2], c[2], i;

	for (i = 0; i < 2; i++) {
		scanf("%d.%d.%d", &a[i], &b[i], &c[i]);
	}

	if (a[1] <= a[0] && b[1] <= b[0] && c[1] <= c[0]) printf("YES\n");
	else printf("NO\n");

	return 0;
}
0