結果
| 問題 | No.544 Delete 7 |
| コンテスト | |
| ユーザー |
mikan765
|
| 提出日時 | 2017-07-14 22:52:31 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 628 bytes |
| 記録 | |
| コンパイル時間 | 388 ms |
| コンパイル使用メモリ | 80,232 KB |
| 実行使用メモリ | 13,056 KB |
| 最終ジャッジ日時 | 2026-06-06 17:27:53 |
| 合計ジャッジ時間 | 4,269 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 29 TLE * 1 -- * 18 |
ソースコード
#include <iostream>
#include <stdio.h>
#define rep(i,n) for(int i = 0;i < n;i++)
#define REP(i,n,k) for(int i = n;i < k;i++)
#define P(p) cout << (p) << endl;//print
using namespace std;
bool check(int a);
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n;
int m=0;
cin >> n;
int nn = n;
while(check(n)||check(m)){
m+=n/2;
n=nn-m;
}
cout << n << " " <<m << endl;
return 0;
}
bool check(int a){
if(a<0) a = -a;
for(int i=0;i<9;i++){
if(a%10==7){
return true;
}else{
a=a/10;
}
}
return false;
}
mikan765