結果
問題 |
No.293 4>7の世界
|
ユーザー |
|
提出日時 | 2017-08-24 13:37:37 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 571 bytes |
コンパイル時間 | 399 ms |
コンパイル使用メモリ | 55,264 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-15 14:17:29 |
合計ジャッジ時間 | 1,186 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 20 |
ソースコード
#include <iostream> using namespace std; int main() { char str1[11], str2[11], stra1[11], srea2[11]; int a1, a2, i = 0; int j = 0, r = 0; cin >> str1 >> str2; for (int j = 0; str1[j] == '\0'; j++) {} for (int r = 0; str2[r] == '\0'; r++) {} if (j == r) { for (i = 0; i == '\0'; i++) { if (str1[i] == 4 && str2[i] == 7) { cout << str1 << '\n'; break; } else if (str1[i] == 7 && str2[i] == 4) cout << str2 << '\n'; break; } } else { if (j < r) { cout << str1 << '\n'; } else { cout << str2 << '\n'; } } return 0; }