提出 #14496187


ソースコード 拡げる

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>

#define SIZE 100005
 
using namespace std;
typedef long long int ll;
typedef pair <int,int> P;
 
using namespace std;


int main()
{	
	ll X;
	scanf("%lld", &X);
	ll kari,answer;
	ll seikai=0;
	for(ll i=1;i<180;i++){
		kari=(360*i)%X;
		if((seikai==0)&&(kari==0)){
			seikai=1;
			answer=(360*i)/X;
			}
	}


	printf("%lld", answer);
}

提出情報

提出日時
問題 A - Takahashikun, The Strider
ユーザ xyzxyzxyz
言語 C++ (GCC 9.2.1)
得点 200
コード長 593 Byte
結果 AC
実行時間 6 ms
メモリ 1732 KiB

コンパイルエラー

./Main.cpp: In function ‘int main()’:
./Main.cpp:26:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   26 |  scanf("%lld", &X);
      |  ~~~~~^~~~~~~~~~~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 11
セット名 テストケース
Sample s1.txt, s2.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, s1.txt, s2.txt
ケース名 結果 実行時間 メモリ
01.txt AC 6 ms 1632 KiB
02.txt AC 1 ms 1676 KiB
03.txt AC 1 ms 1648 KiB
04.txt AC 2 ms 1632 KiB
05.txt AC 1 ms 1724 KiB
06.txt AC 1 ms 1632 KiB
07.txt AC 1 ms 1676 KiB
08.txt AC 1 ms 1732 KiB
09.txt AC 1 ms 1704 KiB
s1.txt AC 1 ms 1728 KiB
s2.txt AC 1 ms 1652 KiB