結果
| 問題 | No.544 Delete 7 | 
| コンテスト | |
| ユーザー |  ldsyb | 
| 提出日時 | 2017-07-14 22:42:30 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 1,000 ms | 
| コード長 | 433 bytes | 
| コンパイル時間 | 1,040 ms | 
| コンパイル使用メモリ | 86,960 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-21 16:09:06 | 
| 合計ジャッジ時間 | 2,680 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 48 | 
ソースコード
#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 && -1e9 <= a && a <= 1e9 && -1e9 <= b && b <= 1e9){
			cout << a << ' ' << b << endl;
			return 0;
		}
	}
}
            
            
            
        