็ตๆžœ

ๅ•้กŒ No.8077 ๐Ÿ”ง
ใƒฆใƒผใ‚ถใƒผ FlkanjinFlkanjin
ๆๅ‡บๆ—ฅๆ™‚ 2021-04-01 23:13:28
่จ€่ชž C++17
(gcc 13.3.0 + boost 1.87.0)
็ตๆžœ
AC  
ๅฎŸ่กŒๆ™‚้–“ 4 ms / 2,000 ms
ใ‚ณใƒผใƒ‰้•ท 1,283 bytes
ใ‚ณใƒณใƒ‘ใ‚คใƒซๆ™‚้–“ 1,855 ms
ใ‚ณใƒณใƒ‘ใ‚คใƒซไฝฟ็”จใƒกใƒขใƒช 136,944 KB
ๆœ€็ต‚ใ‚ธใƒฃใƒƒใ‚ธๆ—ฅๆ™‚ 2025-01-20 07:20:04
ใ‚ธใƒฃใƒƒใ‚ธใ‚ตใƒผใƒใƒผID
๏ผˆๅ‚่€ƒๆƒ…ๅ ฑ๏ผ‰
judge2 / judge2
ใ“ใฎใ‚ณใƒผใƒ‰ใธใฎใƒใƒฃใƒฌใƒณใ‚ธ
๏ผˆ่ฆใƒญใ‚ฐใ‚คใƒณ๏ผ‰
ใƒ•ใ‚กใ‚คใƒซใƒ‘ใ‚ฟใƒผใƒณ ็ตๆžœ
sample AC * 3
other AC * 10
ๆจฉ้™ใŒใ‚ใ‚Œใฐไธ€ๆ‹ฌใƒ€ใ‚ฆใƒณใƒญใƒผใƒ‰ใŒใงใใพใ™

ใ‚ฝใƒผใ‚นใ‚ณใƒผใƒ‰

diff #
ใƒ—ใƒฌใ‚ผใƒณใƒ†ใƒผใ‚ทใƒงใƒณใƒขใƒผใƒ‰ใซใ™ใ‚‹

#define _USE_MATH_DEFIMES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
const int MOD = 1'000'000'007;
const int MOD2 = 998'244'353;
const int INF = 1'000'000'000; //1e9
const int NIL = -1;
const long long LINF = 1'000'000'000'000'000'000; // 1e18
const long double EPS = 1E-10;
template<class T, class S> inline bool chmax(T &a, const S &b){
if(a < b){
a = b; return true;
}
return false;
}
template<class T, class S> inline bool chmin(T &a, const S &b){
if(b < a){
a = b; return true;
}
return false;
}
int main(){
long long a, b, c, d, k; std::cin >> a >> b >> c >> d >> k;
std::cout << (a*b + c - d) % k << std::endl;
return 0;
}
ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”ื”
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0