結果

問題 No.138 化石のバージョン
コンテスト
ユーザー でばら焼肉のたれ
提出日時 2026-09-19 15:27:43
言語 C
(gcc 15.3.0)
コンパイル:
gcc-15 -O2 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 432 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,252 ms
コンパイル使用メモリ 37,600 KB
実行使用メモリ 9,928 KB
最終ジャッジ日時 2026-09-19 15:28:05
合計ジャッジ時間 3,199 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <string.h>


long str_to_int(char st[])
{
	long x = 0;
	int i;

	for (i = 0; i < strlen(st); i++) {
		if (st[i] != '.') {
			x *= 10;
			x += st[i] - '0';
		} else 
			x *= 100;
	}
	return x;
}


int main(void)
{
	char s0[12], s1[12];
	long n0, n1;

	scanf("%s", s0);
	scanf("%s", s1);

	n0 = str_to_int(s0);
	n1 = str_to_int(s1);

	if (n1 <= n0)
		printf("YES\n");
	else
		printf("NO\n");

	return 0;
}
0