結果
問題 |
No.954 Result
|
ユーザー |
![]() |
提出日時 | 2020-03-06 00:44:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 429 bytes |
コンパイル時間 | 1,542 ms |
コンパイル使用メモリ | 168,004 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-14 02:29:56 |
合計ジャッジ時間 | 2,533 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 6 WA * 1 |
other | AC * 20 WA * 9 |
ソースコード
#include<bits/stdc++.h> int main(){ std::vector<long long>a(5); for(int i=0;i<5;i++)std::cin>>a.at(i); long long x=a.at(3),y=a.at(4); for(;x!=1&&y!=1;y=x-y,x-=y){ if(y<=0){ std::cout<<1<<std::endl; return 0; } } for(int i=2;i>=-1;i--){ if(i==-1||a.at(i)!=a.at(i+1)+a.at(i+2)){ std::cout<<4-i<<std::endl; return 0; } } }