結果

問題 No.201 yukicoderじゃんけん
ユーザー pluto77
提出日時 2023-04-26 11:11:17
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 369 bytes
コンパイル時間 472 ms
コンパイル使用メモリ 57,220 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-15 19:24:34
合計ジャッジ時間 1,321 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main() {
  string sa, pa, xa, sb, pb, xb;
  cin >> sa >> pa >> xa >> sb >> pb >> xb;
  if (pa.length() > pb.length()) cout << sa << endl;
  else if (pa.length() < pb.length()) cout << sb << endl;
  else if (pa > pb) cout << sa << endl;
  else if (pa < pb) cout << sb << endl;
  else cout << -1 << endl;
}
0