| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:水题!最抽象的一件事是我交代码的时候,没删一行测试输出,为此还找了老师In Reply To:水题!最抽象的一件事是我交代码的时候,没删一行测试输出,为此还找了老师 Posted by:sand_and_water at 2024-07-11 20:42:29 > #include <iostream>
> #include <cstring>
> using namespace std;
>
> string a, b;
>
> int main(){
> cin >> a >> b;
>
> long long sum = 0;
> // cout << a.size()<< ' ' << b.size() << endl;
> // 最抽象的一件事是我交代码的时候,没删这行测试输出
> // 为此还找了老师
> for(int i = 0; i < a.size(); ++i){
> for(int j = 0; j < b.size(); ++j){
> // cout << (int)(a[i] - '0') << ' ' << (int)(b[j] - '0') << endl;
> sum += (int)(a[i] - '0') * (int)(b[j] - '0');
> }
> }
> cout << sum << endl;
> return 0;
> }
6
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator