結果
問題 | No.2086 A+B問題 |
ユーザー |
![]() |
提出日時 | 2022-10-22 09:46:44 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 552 bytes |
コンパイル時間 | 1,501 ms |
コンパイル使用メモリ | 165,788 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-01 13:26:24 |
合計ジャッジ時間 | 2,418 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 20 |
ソースコード
#include <bits/stdc++.h> #include <vector> #include <tuple> #include <regex> #include <string> #include <stack> #include <algorithm> using namespace std; //printf , scanfが使えるよ!! /* [問題メモ] */ int main() { //Let's algorithm!! char a[101]; char b[101]; char ans[101]; int temp; int carry = 0; scanf("%s %s",a,b); for(int i=0;i<101;i++){ temp = a[i] + b[i] -'0' -'0' + carry; ans[i] = (temp % 10) + '0'; carry = temp - (temp % 10); } printf("%s",ans); return 0; }