結果
| 問題 |
No.544 Delete 7
|
| コンテスト | |
| ユーザー |
aim_cpo
|
| 提出日時 | 2018-02-25 21:10:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 279 bytes |
| コンパイル時間 | 1,814 ms |
| コンパイル使用メモリ | 168,444 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-21 16:45:03 |
| 合計ジャッジ時間 | 3,410 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 48 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int n;
string s;
int main(){
cin>>n;
s=to_string(n);
int m=(int)s.size();
for(int i=0;i<m;i++){
if(s[i]=='7'){
s[i]='6';
}
}
int ans1=stoi(s);
int ans2=n-ans1;
cout<<ans1<<" "<<ans2<<"\n";
return 0;
}
aim_cpo