Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
zad27-notoptimal
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//fpc 3.0.0 program zad27; var x : array [1..30000] of byte; var res : longint; var i, j : integer; begin res:=0; for i:=1 to length(x) do begin x[i]:=i; if i>1 then for j:=1 to i-1 do begin if (((x[i]+x[j]) mod 2) = 1) and (((x[i]*x[j]) mod 3) = 0) then res:=res+1; end; end; writeln('res=',res); end.
Show compiler warnings
[
+
]
Show input
Compilation time: 0.13 sec, absolute running time: 3.47 sec, cpu time: 4.52 sec, memory peak: 3 Mb, absolute service time: 3,78 sec
edit mode
|
history
|
discussion
res=125778479