結果
| 問題 | No.544 Delete 7 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-10 23:06:05 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 446 bytes |
| 記録 | |
| コンパイル時間 | 1,759 ms |
| コンパイル使用メモリ | 166,088 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-22 18:11:31 |
| 合計ジャッジ時間 | 3,821 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 14 WA * 34 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1e9;
bool ok(int n) {
while (n) {
if (n % 10 == 7)return false;
n = n / 10;
}
return true;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
int a = n;
int b = 0;
srand(time(0));
do {
int t = rand() % mod;
a = t;
b = n - a;
} while (!ok(a) && !ok(b));
cout << a << " " << b << endl;
}