結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
tsukacchan
|
| 提出日時 | 2016-03-28 16:36:13 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 278 bytes |
| コンパイル時間 | 380 ms |
| コンパイル使用メモリ | 20,096 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 13:53:53 |
| 合計ジャッジ時間 | 1,531 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d.%d.%d",&A0,&B0,&C0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%d.%d.%d",&A1,&B1,&C1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(void){
int A0,B0,C0,A1,B1,C1;
int dummy=0;
int ver1,ver2;
scanf("%d.%d.%d",&A0,&B0,&C0);
scanf("%d.%d.%d",&A1,&B1,&C1);
ver1= A0*1000000 +B0*1000 +C0;
ver2= A1*1000000 +B1*1000 +C1;
if(ver1>=ver2)
printf("YES");
else
printf("NO");
return 0;
}
tsukacchan