結果
| 問題 |
No.293 4>7の世界
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-08 14:22:26 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 435 bytes |
| コンパイル時間 | 229 ms |
| コンパイル使用メモリ | 20,480 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 03:01:23 |
| 合計ジャッジ時間 | 857 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 15 WA * 5 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%s %s",A,B);
| ^~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
int main(){
char A[15],B[15];
int i;
scanf("%s %s",A,B);
for(i=0;;i++){
if((A[i]=='4')&&(B[i]=='7')){
printf("%s\n",A);
return 0;
}
else if((A[i]=='7')&&(B[i]=='4')){
printf("%s\n",B);
return 0;
}
else if(A[i]>B[i]){
printf("%s\n",A);
return 0;
}
else if (A[i]<B[i]){
printf("%s\n",B);
return 0;
}
}
}