結果

問題 No.544 Delete 7
ユーザー ei1333333
提出日時 2017-07-15 15:30:44
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 358 bytes
コンパイル時間 1,207 ms
コンパイル使用メモリ 160,184 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-21 16:17:38
合計ジャッジ時間 2,908 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main()
{
  int N;
  cin >> N;
  for(;;) {
    int a = rand() % 100000000;
    int b = N - a;

    string latte = to_string(a), malta = to_string(b);
    if(!count(begin(latte), end(latte), '7') &&
       !count(begin(malta), end(malta), '7')) {
      cout << a << " " << b << endl;
      break;
    }
  }
}
0