結果
問題 | No.369 足し間違い |
ユーザー |
![]() |
提出日時 | 2016-05-18 13:50:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 333 bytes |
コンパイル時間 | 1,575 ms |
コンパイル使用メモリ | 165,772 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-11 01:01:58 |
合計ジャッジ時間 | 1,978 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;i++) typedef long long ll; int solve(int n) { int s = 0; rep(i, 0, n) { int a; cin >> a; s += a; } int v; cin >> v; return s - v; } int main() { cin.tie(0); ios::sync_with_stdio(false); int n; while (cin >> n) cout << solve(n) << endl; }