結果

問題 No.138 化石のバージョン
ユーザー みゅー
提出日時 2015-06-22 18:02:58
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 321 bytes
コンパイル時間 420 ms
コンパイル使用メモリ 19,712 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-07 16:35:31
合計ジャッジ時間 1,478 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%d.%d.%d", &a, &b, &c);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%d.%d.%d", &a1, &b2, &c3);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>

int main(void){
	int a, b, c;
	int a1, b2, c3;
	scanf("%d.%d.%d", &a, &b, &c);
	scanf("%d.%d.%d", &a1, &b2, &c3);
	
	if(a > a1){
		printf("YES/n");
	}else if(a == a1 && b > b2){
		printf("YES/n");
	}else if(a == a1 && b == b2 && c >= c3){
		printf("YES/n");
	}else{
			printf("NO/n");
	}
	
	return 0;
}
0