結果
| 問題 | No.2323 Nafmo、A+Bをする |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-15 03:06:34 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 405 bytes |
| コンパイル時間 | 791 ms |
| コンパイル使用メモリ | 31,616 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-16 11:47:44 |
| 合計ジャッジ時間 | 3,190 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 17 |
ソースコード
#include <stdio.h>
#include <stdint.h>
#include <math.h>
int main() {
unsigned long a, b, ans;
unsigned long res[32];
scanf("%lu %lu", a, b);
for (int i = 1; i < 32; i++) {
res[i-1] = (a+b) % (unsigned int)pow(10, i) / (unsigned int)pow(10, i-1);
if (res[i-1] == 2) {
res[i-1] = 0;
}
}
for (int i = 0; i < 32; i++) {
ans += pow(2, i) * res[i];
}
printf("%d\n", ans);
return 0;
}