結果

問題 No.138 化石のバージョン
コンテスト
ユーザー くれちー
提出日時 2016-08-26 10:39:23
言語 C90
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 236 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 166 ms
コンパイル使用メモリ 28,872 KB
最終ジャッジ日時 2026-02-23 22:17:40
ジャッジサーバーID
(参考情報)
judge1 / 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 #
raw source code

#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