結果

問題 No.138 化石のバージョン
ユーザー dnish
提出日時 2017-01-03 00:20:48
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 274 bytes
コンパイル時間 1,543 ms
コンパイル使用メモリ 156,776 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-16 05:23:08
合計ジャッジ時間 2,415 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29 WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%d.%d.%d",&A,&B,&C);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~
main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         scanf("%d.%d.%d",&a,&b,&c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define REP(i,N) for(int i=1;i<N;i++)
int main() {
	int A,B,C;
	int a,b,c;
	scanf("%d.%d.%d",&A,&B,&C);
	scanf("%d.%d.%d",&a,&b,&c);
	if(A*1000000+B*1000+C>a*1000000+b*1000+c) printf("YES\n");
	else printf("NO\n");

	return 0;
}
0