結果
問題 | No.544 Delete 7 |
ユーザー |
![]() |
提出日時 | 2017-07-15 13:26:54 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 506 bytes |
コンパイル時間 | 1,486 ms |
コンパイル使用メモリ | 157,428 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 16:17:35 |
合計ジャッジ時間 | 3,173 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 48 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) typedef long long LL; LL N; int main(){ cin>>N; LL A=N; LL now=1; LL ans1=N; LL ans2=0; while(A!=0){ if(A%10==7){ ans1-=now; ans2+=now; } A/=10; now*=10; } cout<<ans1<<" "<<ans2<<endl; return(0); }