結果
問題 | No.544 Delete 7 |
ユーザー |
![]() |
提出日時 | 2020-09-07 01:23:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 452 bytes |
コンパイル時間 | 1,520 ms |
コンパイル使用メモリ | 166,096 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-29 07:58:20 |
合計ジャッジ時間 | 3,822 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 29 WA * 19 |
ソースコード
#include<bits/stdc++.h>using namespace std;typedef long long ll;using P = pair<int,int>;int main(void){string s;cin >> s;ll a = 0;ll n = 0;for(int i = 0; i < s.length(); i++){n *= 10;n += (s[i] - '0');if(s[i] == '7'){a += 1;}else{a += (s[i] - '0');}a *= 10;}ll b = n - a;cout << a << " " << b << endl;return 0;}