結果

問題 No.544 Delete 7
ユーザー ldsyb
提出日時 2017-07-14 22:36:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 383 bytes
コンパイル時間 865 ms
コンパイル使用メモリ 86,984 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-07 23:14:23
合計ジャッジ時間 6,071 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 14 WA * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <random>
#include <algorithm>
using namespace std;

int main(){
	int64_t n;
	cin >> n;
	random_device rnd;
	mt19937 mt(rnd());
	while(true){
		int64_t a = mt(), b = n - a;
		string s = to_string(a), t = to_string(b);
		if(count(s.begin(), s.end(), '7') == 0 && count(t.begin(), t.end(), '7') == 0){
			cout << a << ' ' << b << endl;
			return 0;
		}
	}
}
0