結果
| 問題 | No.1140 EXPotentiaLLL! |
| コンテスト | |
| ユーザー |
Sooh31
|
| 提出日時 | 2020-07-31 22:06:21 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 400 bytes |
| 記録 | |
| コンパイル時間 | 1,212 ms |
| コンパイル使用メモリ | 211,240 KB |
| 実行使用メモリ | 19,528 KB |
| 最終ジャッジ日時 | 2026-06-11 21:07:01 |
| 合計ジャッジ時間 | 8,726 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 1 |
| other | TLE * 1 -- * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool is_prime(ll p){
for(int i = 2; i * i <= p; i++){
if(p % i == 0) return false;
}
return true;
}
int main(){
int t; cin >> t;
while(t--){
ll a, p; cin >> a >> p;
if(is_prime(p)){
cout << 1 << endl;
}
else{
cout << -1 << endl;
}
}
}
Sooh31