結果
問題 |
No.1119 Division 3
|
ユーザー |
|
提出日時 | 2020-08-23 15:35:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 913 bytes |
コンパイル時間 | 1,516 ms |
コンパイル使用メモリ | 165,336 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 18:40:04 |
合計ジャッジ時間 | 2,429 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; const long long INF = 1LL<<60; ll GCD(ll x,ll y){ if(y == 0) return x; else return GCD(y,x%y); } ll LCM(ll a,ll b){ return a / GCD(a,b) * b; } const int MOD = 1000000007; //void warshall_floyd(int n){ // for(int k=0;k<n;k++){ // for(int i=0;i<n;i++){ // for(int j=0;j<n;j++){ // d[i][j]=min(d[i][j],d[i][k]+d[k][j]); // } // } // } //} //ll calc_digit(ll N) { // ll res = 0; // while (N) { // ++res; // N /= 10; // } // return res; //} //ll sum_digit(ll N) { // ll res = 0; // while (N) { // res += N % 10; // N /= 10; // } // return res; //} int main() { int x,y,z; cin >> x >> y >> z; if(x % 3== 0 || y % 3 == 0 || z % 3 == 0){ cout << "Yes" <<endl; }else{ cout << "No" << endl; } }