結果
問題 | No.293 4>7の世界 |
ユーザー |
![]() |
提出日時 | 2015-11-29 22:12:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 573 bytes |
コンパイル時間 | 768 ms |
コンパイル使用メモリ | 58,076 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 11:34:09 |
合計ジャッジ時間 | 1,577 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
#include <iostream>#include <cmath>#include <string>using namespace std;int main() {int A, B;int m, a, b;int d = 1;cin >> A >> B;for (d = 1, m = max(A, B); m/d >= 10; d*=10) {}while (d >= 1) {if ((A / d) != (B / d)) {a = (A / d) % 10;b = (B / d) % 10;if (((a*b==28)?(-1):1)*(a-b) > 0) {cout << A << endl;} else {cout << B << endl;}return 0;}d /= 10;};cout << A << endl;return 0;}