結果
問題 |
No.693 square1001 and Permutation 2
|
ユーザー |
|
提出日時 | 2019-07-31 23:53:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 268 bytes |
コンパイル時間 | 3,354 ms |
コンパイル使用メモリ | 191,200 KB |
最終ジャッジ日時 | 2025-01-07 10:22:37 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 6 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin >> n; int a; int sum = 0; for (int i = 0; i < n; i++) { cin >> a; sum += a; } cout << abs(n*(n+1)/2 - sum) << endl; return 0; }