1 条题解
-
0
C :
#include<stdio.h> void main() { int n; scanf("%d",&n); if(n>=20&&n<=30){ printf("OK"); }else{ printf("NO"); } }C++ :
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; if(t >= 20 && t <= 30){ cout<<"OK"<<endl; }else{ cout<<"NO"<<endl; } return 0; }Pascal :
var a:longint; begin read(a); if (a>=20) and (a<=30) then write('OK') else write('NO'); end.Java :
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); if(a>=20&&a<=30) { System.out.println("OK"); }else { System.out.println("NO"); } } }Python :
t=int(input()) if t>=20 and t<=30: print('OK') else: print('NO')
- 1
信息
- ID
- 282
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者