結果
| 問題 |
No.544 Delete 7
|
| コンテスト | |
| ユーザー |
ldsyb
|
| 提出日時 | 2017-07-14 22:39:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 383 bytes |
| コンパイル時間 | 959 ms |
| コンパイル使用メモリ | 86,856 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-07 23:16:12 |
| 合計ジャッジ時間 | 7,016 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 20 WA * 28 |
ソースコード
#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;
}
}
}
ldsyb