結果
問題 | No.1119 Division 3 |
ユーザー |
![]() |
提出日時 | 2020-07-24 12:14:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 1,168 bytes |
コンパイル時間 | 1,550 ms |
コンパイル使用メモリ | 167,928 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-24 23:10:59 |
合計ジャッジ時間 | 2,236 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 |
ソースコード
#include <iostream>#include <random>#include <bits/stdc++.h>using namespace std;using ll = __int128;using ull = long long;std::ostream &operator<<(std::ostream &dest, __int128_t value) {std::ostream::sentry s(dest);if (s) {__uint128_t tmp = value < 0 ? -value : value;char buffer[128];char *d = std::end(buffer);do {--d;*d = "0123456789"[tmp % 10];tmp /= 10;} while (tmp != 0);if (value < 0) {--d;*d = '-';}int len = std::end(buffer) - d;if (dest.rdbuf()->sputn(d, len) != len) {dest.setstate(std::ios_base::badbit);}}return dest;}__int128 p(string &s) {__int128 ret = 0;for (int i = 0; i < s.length(); i++)if ('0' <= s[i] && s[i] <= '9')ret = 10 * ret + s[i] - '0';return ret;}ll gcds(ll a,ll b){if (a%b == 0){return(b);}else{return(gcds(b, a%b));}}ll si(ll a,ll b){ll r=gcds(a,b);return a/r;}ll bo(ll a,ll b){ll r=gcds(a,b);return b/r;}int main(){ull a,b,c;cin>>a>>b>>c;if(a%3!=0&&b%3!=0&&c%3!=0){cout<<"No"<<endl;}else{cout<<"Yes"<<endl;}}